diff options
author | Julien Ropé <jrope@redhat.com> | 2020-09-24 09:49:14 +0200 |
---|---|---|
committer | Julien Ropé <jrope@redhat.com> | 2020-10-19 17:59:19 +0200 |
commit | 9574a4299f6beef46708e585a1e2cb8831627e18 (patch) | |
tree | 3e7199482ec3ee0ca95df30621b19f4256f05bdb | |
parent | 5ab5fe3475956740995c2cfed136b865fcd226f6 (diff) |
When using GTK for monitors, we should not update the X11 structures.
X11 events are still used to notify the daemon of monitor resolution
changes, but the X11 structures themselves do not need to be updated,
because we will get all required informations from the GTK library.
Signed-off-by: Julien Ropé <jrope@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
-rw-r--r-- | src/vdagent/x11-randr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vdagent/x11-randr.c b/src/vdagent/x11-randr.c index cac9643..52d3de6 100644 --- a/src/vdagent/x11-randr.c +++ b/src/vdagent/x11-randr.c @@ -511,6 +511,7 @@ static int set_screen_to_best_size(struct vdagent_x11 *x11, int width, int heigh void vdagent_x11_randr_handle_root_size_change(struct vdagent_x11 *x11, int screen, int width, int height) { +#ifndef USE_GTK_FOR_MONITORS update_randr_res(x11, 0); if (width == x11->width[screen] && height == x11->height[screen]) { @@ -523,6 +524,7 @@ void vdagent_x11_randr_handle_root_size_change(struct vdagent_x11 *x11, x11->width[screen] = width; x11->height[screen] = height; +#endif if (!x11->dont_send_guest_xorg_res) { vdagent_display_send_daemon_guest_res(x11->vdagent_display, TRUE); } @@ -542,7 +544,9 @@ int vdagent_x11_randr_handle_event(struct vdagent_x11 *x11, break; } case RRNotify: { +#ifndef USE_GTK_FOR_MONITORS update_randr_res(x11, 0); +#endif if (!x11->dont_send_guest_xorg_res) vdagent_display_send_daemon_guest_res(x11->vdagent_display, TRUE); break; |