remove wlr_output_damage_whole

This commit is contained in:
korei999 2023-12-01 13:34:22 +02:00
parent e9403d7a4e
commit 3a2bf53b8f

25
dwl.c
View file

@ -338,7 +338,6 @@ static void pointerconstraintsetregion(struct wl_listener *listener, void *data)
static void pointerfocus(Client *c, struct wlr_surface *surface, static void pointerfocus(Client *c, struct wlr_surface *surface,
double sx, double sy, uint32_t time); double sx, double sy, uint32_t time);
static void printstatus(void); static void printstatus(void);
static void wlr_output_damage_whole(struct wlr_output *output);
static void powermgrsetmodenotify(struct wl_listener *listener, void *data); static void powermgrsetmodenotify(struct wl_listener *listener, void *data);
static void quit(const Arg *arg); static void quit(const Arg *arg);
static void rendermon(struct wl_listener *listener, void *data); static void rendermon(struct wl_listener *listener, void *data);
@ -649,7 +648,6 @@ buttonpress(struct wl_listener *listener, void *data)
const Button *b; const Button *b;
wlr_idle_notifier_v1_notify_activity(idle_notifier, seat); wlr_idle_notifier_v1_notify_activity(idle_notifier, seat);
// handlecursoractivity(false);
switch (event->state) { switch (event->state) {
case WLR_BUTTON_PRESSED: case WLR_BUTTON_PRESSED:
@ -2455,32 +2453,12 @@ printstatus(void)
dwl_ipc_output_printstatus(m); dwl_ipc_output_printstatus(m);
} }
void
wlr_output_damage_whole(struct wlr_output *output) {
int width, height;
pixman_region32_t damage;
struct wlr_output_event_damage event;
wlr_output_transformed_resolution(output, &width, &height);
pixman_region32_init_rect(&damage, 0, 0, width, height);
event = (struct wlr_output_event_damage){
.output = output,
.damage = &damage,
};
wl_signal_emit_mutable(&output->events.damage, &event);
pixman_region32_fini(&damage);
}
void void
powermgrsetmodenotify(struct wl_listener *listener, void *data) powermgrsetmodenotify(struct wl_listener *listener, void *data)
{ {
struct wlr_output_power_v1_set_mode_event *event = data; struct wlr_output_power_v1_set_mode_event *event = data;
wlr_output_enable(event->output, event->mode); wlr_output_enable(event->output, event->mode);
if (event->mode)
wlr_output_damage_whole(event->output);
wlr_output_commit(event->output); wlr_output_commit(event->output);
} }
@ -3457,7 +3435,8 @@ rotatetags(const Arg *arg)
bool shift = false; bool shift = false;
switch(abs(i)) { switch(abs(i)) {
default: break; default:
break;
case SHIFT_R: case SHIFT_R:
shift = true; shift = true;
break; break;