aboutsummaryrefslogtreecommitdiff
path: root/rootston/output.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-01-19 11:31:04 +0100
committeremersion <contact@emersion.fr>2018-01-19 11:31:04 +0100
commit7f9f918b78f438c60f959b30d6111acdfa4dfc27 (patch)
treeecb59c206e8c02e6e06862a193f1e7786df0e3a7 /rootston/output.c
parent443bd4cd898b86cf1056416f58e30cb451d1fcd4 (diff)
rootston: damage output on mode change
Diffstat (limited to 'rootston/output.c')
-rw-r--r--rootston/output.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rootston/output.c b/rootston/output.c
index 6b12898b..f7c113ca 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -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);