Another attempt at getting Xrandr screen size changes right. Actually

* gdk/x11/gdkevents-x11.c:
        * gdk/x11/gdkscreen-x11.[hc]: Another attempt at getting Xrandr
        screen size changes right. Actually handle XRRScreenChangeNotify
        events, and ignore root ConfigureNotify events if we are using
        Xrandr. Only emit size-changed signals if the screen size changed,
        and only emit monitor-changed signals if the monitors changed.


svn path=/trunk/; revision=22398
This commit is contained in:
Matthias Clasen
2009-02-24 05:09:13 +00:00
parent 7d8930fdcc
commit fcdd092ae6
4 changed files with 109 additions and 34 deletions

View File

@ -2107,10 +2107,11 @@ gdk_event_translate (GdkDisplay *display,
else
#endif
#ifdef HAVE_RANDR
if (xevent->type - display_x11->xrandr_event_base == RRNotify)
if (xevent->type - display_x11->xrandr_event_base == RRScreenChangeNotify ||
xevent->type - display_x11->xrandr_event_base == RRNotify)
{
if (screen)
_gdk_x11_screen_process_monitors_change (screen);
_gdk_x11_screen_size_changed (screen, xevent);
}
else
#endif