GdkScreen size-changed and gdk_monitor_get_workarea problem
- Date: Tue, 6 Nov 2018 21:35:33 +0100
- From: "Sebastian Geiger (Lanoxx)" <lanoxx@xxxxxxx>
- Subject: GdkScreen size-changed and gdk_monitor_get_workarea problem
Hi Gtk developers,
I am experiencing a wired issue and I am wondering if I am using the API
in a wrong way of if there is a problem with Gtk.
I have registered a callback to the "size-changed" signal like so:
g_signal_connect (screen, "size-changed",
In the monitor_changed_cb function I am first calling:
gdk_display_get_monitor_at_point and then gdk_monitor_get_workarea.
My implementation seemed to work when the monitor size changes to
a smaller size, but not when changing to a bigger size.
I am testing this in VM. To test my implementation I changed the monitor
resolution a couple of time via Gnome Settings.
I start my app with a resolution of 1400x1050.
First I change to 1024x786 and my signal handler correctly reports the
new monitor size minus panel area.
Then I change back to 1400x1050 and my signal handler instead reports
1024x720 (previous size minus panel area).
Now I change to 1920x1080 and my signal handler reports 1400x1002
(previous size minus panel area).
I guess its more likely that I am doing something wrong, rather than
that there is a bug in Gtk. So, is there something I should do in my
signal handler before I call gdk_monitor_get_workarea to get the correct
gtk-devel-list mailing list