packages: vnc/vnc.spec, vnc/vnc-xinerama.patch (NEW) - Added xinerama patch...

kosmo kosmo at pld-linux.org
Mon Jul 27 12:18:00 CEST 2009


Author: kosmo                        Date: Mon Jul 27 10:18:00 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- Added xinerama patch from Gentoo. Fixes full screen mode on Xinerama enabled
  displays.

---- Files affected:
packages/vnc:
   vnc.spec (1.87 -> 1.88) , vnc-xinerama.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/vnc/vnc.spec
diff -u packages/vnc/vnc.spec:1.87 packages/vnc/vnc.spec:1.88
--- packages/vnc/vnc.spec:1.87	Mon Feb 16 10:32:52 2009
+++ packages/vnc/vnc.spec	Mon Jul 27 12:17:54 2009
@@ -59,19 +59,20 @@
 Patch21:	%{name}-24bit.patch
 Patch22:	%{name}-gcc43.patch
 Patch23:	%{name}-xorg.patch
-Patch24:	%{name}-privates.patch
-Patch25:	%{name}-mieq.patch
-Patch26:	%{name}-allocate.patch
-Patch27:	%{name}-paint.patch
-Patch28:	%{name}-selections.patch
-Patch29:	%{name}-manminor.patch
-Patch30:	%{name}-clipboard.patch
-Patch31:	%{name}-scrollbars.patch
-Patch32:	%{name}-bounds.patch
-Patch33:	%{name}-includes.patch
-Patch34:	%{name}-viewerIPv6.patch
-Patch35:	%{name}-rh212985.patch
-Patch36:	%{name}-build.patch
+Patch24:	%{name}-xinerama.patch
+Patch25:	%{name}-privates.patch
+Patch26:	%{name}-mieq.patch
+Patch27:	%{name}-allocate.patch
+Patch28:	%{name}-paint.patch
+Patch29:	%{name}-selections.patch
+Patch30:	%{name}-manminor.patch
+Patch31:	%{name}-clipboard.patch
+Patch32:	%{name}-scrollbars.patch
+Patch33:	%{name}-bounds.patch
+Patch34:	%{name}-includes.patch
+Patch35:	%{name}-viewerIPv6.patch
+Patch36:	%{name}-rh212985.patch
+Patch37:	%{name}-build.patch
 #Sources and patches above 100 belong to xserver
 Patch100:	%{xname}-ncurses.patch
 Patch101:	%{xname}-xwrapper.patch
@@ -283,6 +284,7 @@
 %patch21 -p1
 %patch22 -p1
 %patch23 -p1
+%patch24 -p1
 
 mkdir -p unix/xorg-server/hw/vnc
 cp %{SOURCE9} unix/xorg-server/hw/vnc/Makefile.am
@@ -300,9 +302,8 @@
 	unix/xorg-server/{hw/vnc/{cfb,fb,fbrop}.h,include/pixman.h}
 
 cd unix/xorg-server/hw/vnc
-%patch24 -p1
-cd -
 %patch25 -p1
+cd -
 %patch26 -p1
 %patch27 -p1
 %patch28 -p1
@@ -314,7 +315,7 @@
 %patch34 -p1
 %patch35 -p1
 %patch36 -p1
-
+%patch37 -p1
 
 %build
 cd common
@@ -477,6 +478,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.88  2009/07/27 10:17:54  kosmo
+- Added xinerama patch from Gentoo. Fixes full screen mode on Xinerama enabled
+  displays.
+
 Revision 1.87  2009/02/16 09:32:52  blues
 - security blocker added
 

================================================================
Index: packages/vnc/vnc-xinerama.patch
diff -u /dev/null packages/vnc/vnc-xinerama.patch:1.1
--- /dev/null	Mon Jul 27 12:18:00 2009
+++ packages/vnc/vnc-xinerama.patch	Mon Jul 27 12:17:54 2009
@@ -0,0 +1,192 @@
+diff -urN vnc-4_1_3-unixsrc.orig/unix/configure.in vnc-4_1_3-unixsrc/unix/configure.in
+--- vnc-4_1_3-unixsrc.orig/unix/configure.in	2009-07-27 12:09:24.000000000 +0200
++++ vnc-4_1_3-unixsrc/unix/configure.in	2009-07-27 12:10:12.000000000 +0200
+@@ -77,6 +77,11 @@
+ 
+ AC_SUBST(USE_FB)
+ 
++AC_CHECK_LIB(Xinerama, XineramaIsActive,
++       [ AC_DEFINE(HAVE_XINERAMA, 1, [Define if you have Xinerama support])
++         X_PRE_LIBS="$X_PRE_LIBS -lXinerama"
++       ],, $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS)
++
+ BOILERPLATE=boilerplate.mk
+ 
+ if (sh -c "make --version" 2>/dev/null | grep GNU 2>&1 >/dev/null); then
+Pliki vnc-4_1_3-unixsrc.orig/unix/vncviewer/buildtime.o i vnc-4_1_3-unixsrc/unix/vncviewer/buildtime.o ró¿ni± siê
+diff -urN vnc-4_1_3-unixsrc.orig/unix/vncviewer/CConn.cxx vnc-4_1_3-unixsrc/unix/vncviewer/CConn.cxx
+--- vnc-4_1_3-unixsrc.orig/unix/vncviewer/CConn.cxx	2009-07-27 12:09:24.000000000 +0200
++++ vnc-4_1_3-unixsrc/unix/vncviewer/CConn.cxx	2009-07-27 11:53:17.000000000 +0200
+@@ -40,6 +40,10 @@
+ #include <string>
+ #include <iostream>
+ 
++#ifdef HAVE_XINERAMA
++#   include <X11/extensions/Xinerama.h>
++#endif
++
+ using namespace rfb;
+ 
+ static rfb::LogWriter vlog("CConn");
+@@ -52,7 +56,7 @@
+ StringParameter windowName("name", "The X window name", "");
+ 
+ CConn::CConn(Display* dpy_, int argc_, char** argv_, network::Socket* sock_,
+-             char* vncServerName, bool reverse)
++             char* vncServerName, bool reverse, int xineramascreen)
+   : dpy(dpy_), argc(argc_),
+     argv(argv_), serverHost(0), serverPort(0), sock(sock_), viewport(0),
+     desktop(0), desktopEventHandler(0),
+@@ -66,7 +70,7 @@
+ {
+   CharArray menuKeyStr(menuKey.getData());
+   menuKeysym = XStringToKeysym(menuKeyStr.buf);
+-
++  xineramaScreen = xineramascreen;
+   setShared(shared);
+   addSecType(secTypeNone);
+   addSecType(secTypeVncAuth);
+@@ -591,7 +595,9 @@
+   if (fullScreen) {
+     XGrabKeyboard(dpy, desktop->win(), True, GrabModeAsync, GrabModeAsync,
+                   CurrentTime);
++    desktop->setGrabKeyboard(true);
+   } else {
++    desktop->setGrabKeyboard(false);
+     XUngrabKeyboard(dpy, CurrentTime);
+   }
+   if (oldViewport) delete oldViewport;
+@@ -602,6 +608,22 @@
+   const char * par = embedParent.getValueStr();
+   viewport->setMaxSize(cp.width, cp.height);
+   if (fullScreen) {
++#ifdef HAVE_XINERAMA
++    int number;
++    XineramaScreenInfo* info = XineramaQueryScreens (dpy, &number);
++    // Find requested Xinerama screen
++    for (int i = 0; (info != NULL) && (i < number); i++) {
++      // Setup window to match found Xinerama screen
++      if (info[i].screen_number == xineramaScreen) {
++        viewport->setUSPosition(info[i].x_org, info[i].y_org);
++        viewport->resize(info[i].width, info[i].height);
++        XFree(info);
++        return;
++      }
++    }
++    XFree(info);
++#endif
++    // No Xinerama screen found, or none requested, fill default display
+     viewport->resize(DisplayWidth(dpy,DefaultScreen(dpy)),
+                      DisplayHeight(dpy,DefaultScreen(dpy)));
+  } else if (strlen(par) != 0) {
+diff -urN vnc-4_1_3-unixsrc.orig/unix/vncviewer/CConn.h vnc-4_1_3-unixsrc/unix/vncviewer/CConn.h
+--- vnc-4_1_3-unixsrc.orig/unix/vncviewer/CConn.h	2009-07-27 12:09:24.000000000 +0200
++++ vnc-4_1_3-unixsrc/unix/vncviewer/CConn.h	2009-07-27 11:53:35.000000000 +0200
+@@ -48,7 +48,7 @@
+ public:
+ 
+   CConn(Display* dpy_, int argc_, char** argv_, network::Socket* sock_,
+-        char* vncServerName, bool reverse=false);
++        char* vncServerName, bool reverse=false, int xineramascreen=-1);
+   ~CConn();
+ 
+   // TXDeleteWindowCallback methods
+@@ -118,6 +118,7 @@
+   bool fullScreen;
+   bool ctrlDown;
+   bool altDown;
++  int xineramaScreen;
+   KeySym menuKeysym;
+   TXMenu menu;
+   TXEventHandler* menuEventHandler;
+diff -urN vnc-4_1_3-unixsrc.orig/unix/vncviewer/DesktopWindow.cxx vnc-4_1_3-unixsrc/unix/vncviewer/DesktopWindow.cxx
+--- vnc-4_1_3-unixsrc.orig/unix/vncviewer/DesktopWindow.cxx	2009-07-27 12:09:24.000000000 +0200
++++ vnc-4_1_3-unixsrc/unix/vncviewer/DesktopWindow.cxx	2009-07-27 11:52:44.000000000 +0200
+@@ -74,6 +74,7 @@
+     lastButtonMask(0)
+ {
+   setEventHandler(this);
++  grabkeys = false;
+   gc = XCreateGC(dpy, win(), 0, 0);
+   addEventMask(ExposureMask | ButtonPressMask | ButtonReleaseMask |
+                PointerMotionMask | KeyPressMask | KeyReleaseMask |
+@@ -423,6 +424,11 @@
+       XConvertSelection(dpy, xaCLIPBOARD, xaTIMESTAMP, xaSELECTION_TIME,
+                         win(), ev->xcrossing.time);
+     }
++    // Grab keyboard
++    if (grabkeys) {
++      XGrabKeyboard(dpy, win(), True, GrabModeAsync, GrabModeAsync,
++                  CurrentTime);
++    }
+     break;
+ 
+   case LeaveNotify:
+@@ -434,6 +440,7 @@
+       ownSelection(xaCLIPBOARD, ev->xcrossing.time);
+       currentSelectionTime = ev->xcrossing.time;
+     }
++
+     // Release all keys - this should probably done on a FocusOut event, but
+     // LeaveNotify is near enough...
+     for (int i = 8; i < 256; i++) {
+@@ -442,6 +449,10 @@
+         downKeysym[i] = 0;
+       }
+     }
++    // Release keyboard
++    if (grabkeys) {
++      XUngrabKeyboard (dpy, CurrentTime); 
++    }
+     break;
+   }
+ }
+diff -urN vnc-4_1_3-unixsrc.orig/unix/vncviewer/DesktopWindow.h vnc-4_1_3-unixsrc/unix/vncviewer/DesktopWindow.h
+--- vnc-4_1_3-unixsrc.orig/unix/vncviewer/DesktopWindow.h	2009-07-27 12:09:24.000000000 +0200
++++ vnc-4_1_3-unixsrc/unix/vncviewer/DesktopWindow.h	2009-07-27 11:52:44.000000000 +0200
+@@ -52,6 +52,11 @@
+ 
+   // resetLocalCursor() stops the rendering of the local cursor
+   void resetLocalCursor();
++  
++  // If set, the keyboard focus will be grabbed/released when the pointer
++  // enters/leaves the window. The window manager will take car of the
++  // keyboard focus is unset.
++  void setGrabKeyboard(bool grab) {grabkeys = grab;}
+ 
+   // Methods forwarded from CConn
+   void setColourMapEntries(int firstColour, int nColours, rdr::U16* rgbs);
+@@ -117,6 +122,7 @@
+   bool gettingInitialSelectionTime;
+   bool newServerCutText;
+   char* serverCutText_;
++  bool grabkeys;
+ 
+   rfb::Timer setColourMapEntriesTimer;
+   TXViewport* viewport;
+diff -urN vnc-4_1_3-unixsrc.orig/unix/vncviewer/vncviewer.cxx vnc-4_1_3-unixsrc/unix/vncviewer/vncviewer.cxx
+--- vnc-4_1_3-unixsrc.orig/unix/vncviewer/vncviewer.cxx	2009-07-27 12:09:24.000000000 +0200
++++ vnc-4_1_3-unixsrc/unix/vncviewer/vncviewer.cxx	2009-07-27 11:54:22.000000000 +0200
+@@ -103,6 +103,12 @@
+ /* Support for reparenting */
+ StringParameter embedParent("Parent", "X Window to use as a parent", "");
+ 
++#ifdef HAVE_XINERAMA
++IntParameter xineramaScreen("XineramaScreen", "Xineramascreen used in fullscreen", -1);
++#else
++static int xineramaScreen=-1;
++#endif
++
+ char aboutText[256];
+ char* programName;
+ extern char buildtime[];
+@@ -312,7 +318,7 @@
+ 
+     TXWindow::init(dpy, "Vncviewer");
+     xloginIconifier.iconify(dpy);
+-    CConn cc(dpy, argc, argv, sock, vncServerName, listenMode);
++    CConn cc(dpy, argc, argv, sock, vncServerName, listenMode, xineramaScreen);
+ 
+     // X events are processed whenever reading from the socket would block.
+ 
+Pliki vnc-4_1_3-unixsrc.orig/unix/vncviewer/vncviewer.o i vnc-4_1_3-unixsrc/unix/vncviewer/vncviewer.o ró¿ni± siê
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/vnc/vnc.spec?r1=1.87&r2=1.88&f=u



More information about the pld-cvs-commit mailing list