Stefan Dirsch
e6fe369154
- u_tigervnc-check-shm-harder.patch * Check if SHM really works before deciding to use it. (bnc#890580) OBS-URL: https://build.opensuse.org/request/show/245052 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=36
27 lines
932 B
Diff
27 lines
932 B
Diff
Index: vncviewer/X11PixelBuffer.cxx
|
|
===================================================================
|
|
--- vncviewer/X11PixelBuffer.cxx (revision 5186)
|
|
+++ vncviewer/X11PixelBuffer.cxx (working copy)
|
|
@@ -158,6 +158,8 @@
|
|
Bool pixmaps;
|
|
XErrorHandler old_handler;
|
|
Status status;
|
|
+ Window test_window;
|
|
+ GC test_gc;
|
|
|
|
if (!XShmQueryVersion(fl_display, &major, &minor, &pixmaps))
|
|
return 0;
|
|
@@ -187,6 +189,12 @@
|
|
old_handler = XSetErrorHandler(XShmAttachErrorHandler);
|
|
|
|
XShmAttach(fl_display, shminfo);
|
|
+ test_window = XCreateSimpleWindow(fl_display, XDefaultRootWindow(fl_display), 0, 0, width(), height(), 0, 0, 0);
|
|
+ test_gc = XCreateGC(fl_display, test_window, 0, 0);
|
|
+ XShmPutImage(fl_display, test_window, test_gc, xim, 0, 0, 0, 0, width(), height(), False);
|
|
+ XFreeGC(fl_display, test_gc);
|
|
+ XDestroyWindow(fl_display, test_window);
|
|
+
|
|
XSync(fl_display, False);
|
|
|
|
XSetErrorHandler(old_handler);
|