summaryrefslogtreecommitdiff
path: root/gdk/x11/gdkscreen-x11.h
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2013-11-22 18:33:02 +0100
committerCarlos Garnacho <carlosg@gnome.org>2013-11-25 17:19:46 +0100
commitd1414211bf2fa3bb26ca859f99afb68a2756af9f (patch)
tree4d6080f93517dd76957d0b4cae8e025a4c12f143 /gdk/x11/gdkscreen-x11.h
parent118b09c68c6cd51f5b4ffc3125310cbefb8b4baf (diff)
downloadgtk+-d1414211bf2fa3bb26ca859f99afb68a2756af9f.tar.gz
x11: keep track of the screen pixel size by calculating the bounding box of monitors
This is so we always have the latest information given by XRandR (or other), and not rely on Core protocol information that might not have been updated yet. This is specially visible when a monitor is connected (less frequent) or disconnected (much more frequent), callbacks on GdkScreen::monitors-changed that call gdk_screen_get_width/height() could get the screen size previous to the monitor rearrangement. So in order to fix this, keep track of the latest monitors information, and calculate the bounding box in order to know the screen size. https://bugzilla.gnome.org/show_bug.cgi?id=715029
Diffstat (limited to 'gdk/x11/gdkscreen-x11.h')
-rw-r--r--gdk/x11/gdkscreen-x11.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/x11/gdkscreen-x11.h b/gdk/x11/gdkscreen-x11.h
index ce8598e11e..87be0aa59b 100644
--- a/gdk/x11/gdkscreen-x11.h
+++ b/gdk/x11/gdkscreen-x11.h
@@ -47,6 +47,9 @@ struct _GdkX11Screen
GdkX11Monitor *monitors;
gint primary_monitor;
+ gint width;
+ gint height;
+
gint window_scale;
gboolean fixed_window_scale;