[Spice-devel] [PATCH 1/2] client/x11/platform: don't call XRRSelectInput if no xrandr extension
Christophe Fergeau
cfergeau at redhat.com
Mon Nov 14 08:25:41 PST 2011
On Mon, Nov 14, 2011 at 03:09:42PM +0200, Alon Levy wrote:
> ---
> client/x11/platform.cpp | 15 +++++++++++++--
> 1 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp
> index 9094a64..c66386d 100644
> --- a/client/x11/platform.cpp
> +++ b/client/x11/platform.cpp
> @@ -1113,6 +1113,15 @@ private:
> bool _out_of_sync;
> };
>
> +inline int has_xrandr(void)
> +{
> + return using_xrandr_1_0
> +#ifdef USE_XRANDR_1_2
> + || using_xrandr_1_2
> +#endif
> + ;
> +}
> +
> XineramaScreen::XineramaScreen(Display* display, int screen, int& next_mon_id,
> XineramaScreenInfo* xin_screens, int num_xin_screens)
> : XScreen(display, screen)
> @@ -1123,8 +1132,10 @@ XineramaScreen::XineramaScreen(Display* display, int screen, int& next_mon_id,
> }
> Window root_window = RootWindow(display, screen);
> XSelectInput(display, root_window, StructureNotifyMask);
> - XRRSelectInput(display, root_window, RRScreenChangeNotifyMask); // TODO: this fails if we don't have RR extension (but do have XINERAMA)
> - XPlatform::set_win_proc(root_window, root_win_proc); // Xlib: extension "RANDR" missing on display ":3.0".
> + if (has_xrandr()) {
> + XRRSelectInput(display, root_window, RRScreenChangeNotifyMask);
> + }
Is it even possible to have randr enabled when this xinerama class is in
use?
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20111114/63247ad5/attachment.pgp>
More information about the Spice-devel
mailing list