It will now update the screen info, then detect and update output
devices just like it does in CompScreen::init. This allows compiz to
do the right thing when an external monitor or projector is plugged in
and enabled using the 'gnome-display-properties' dialog or the
'xrandr' command line tool.
Call XRRSelectInput in CompScreen::init, asking for
RRScreenChangeNotify events. Without this those events are never given
to compiz. That means that the switch case for it in
plugins/composite/screen.cpp was never triggered, until now.
---
src/screen.cpp | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/screen.cpp b/src/screen.cpp
index 0068719..e911d8f 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -759,6 +759,14 @@ PrivateScreen::processEvents ()
}
break;
default:
+ if (randrExtension &&
+ event.type == randrEvent + RRScreenChangeNotify)
+ {
+ XRRUpdateConfiguration (&event);
+ updateScreenInfo ();
+ detectOutputDevices ();
+ updateOutputDevices ();
+ }
break;
}
@@ -4313,6 +4321,11 @@ CompScreen::init (const char *name)
root = XRootWindow (dpy, DefaultScreen (dpy));
+ if (priv->randrExtension)
+ {
+ XRRSelectInput (dpy, root, RRScreenChangeNotifyMask);
+ }
+
attr.override_redirect = true;
attr.event_mask = PropertyChangeMask;
--
1.7.4.1
_______________________________________________
dev mailing list
[email protected]
http://lists.compiz.org/mailman/listinfo/dev