rootston: damage output on mode change

master
emersion 7 years ago
parent 443bd4cd89
commit 7f9f918b78
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

@ -14,10 +14,12 @@ struct roots_output {
struct roots_view *fullscreen_view;
struct wl_listener frame;
struct timespec last_frame;
pixman_region32_t damage, previous_damage;
struct wl_event_source *repaint_timer;
struct wl_listener frame;
struct wl_listener mode;
};
void output_add_notify(struct wl_listener *listener, void *data);

@ -471,6 +471,11 @@ void output_damage_from_view(struct roots_output *output,
// TODO: subsurfaces, popups, etc
}
static void output_handle_mode(struct wl_listener *listener, void *data) {
struct roots_output *output = wl_container_of(listener, output, mode);
output_damage_whole(output);
}
static void set_mode(struct wlr_output *output,
struct roots_output_config *oc) {
int mhz = (int)(oc->mode.refresh_rate * 1000);
@ -530,6 +535,8 @@ void output_add_notify(struct wl_listener *listener, void *data) {
output->frame.notify = output_handle_frame;
wl_signal_add(&wlr_output->events.frame, &output->frame);
output->mode.notify = output_handle_mode;
wl_signal_add(&wlr_output->events.mode, &output->mode);
struct roots_output_config *output_config =
roots_config_get_output(config, wlr_output);

Loading…
Cancel
Save