public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-misc/tigervnc/files: xserver111.patch
@ 2011-11-12 18:05 Raul Porcel (armin76)
  0 siblings, 0 replies; only message in thread
From: Raul Porcel (armin76) @ 2011-11-12 18:05 UTC (permalink / raw
  To: gentoo-commits

armin76     11/11/12 18:05:41

  Added:                xserver111.patch
  Log:
  Version bump, fixes bug 387729
  
  (Portage version: 2.1.10.30/cvs/Linux ia64)

Revision  Changes    Path
1.1                  net-misc/tigervnc/files/xserver111.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/tigervnc/files/xserver111.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/tigervnc/files/xserver111.patch?rev=1.1&content-type=text/plain

Index: xserver111.patch
===================================================================
diff -up tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc.xorg111 tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc
--- tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc.xorg111	2011-08-09 23:16:36.000000000 +0200
+++ tigervnc-1.1.0/unix/xserver/hw/vnc/Input.cc	2011-09-14 13:22:19.540000049 +0200
@@ -82,10 +82,11 @@ static KeyCode KeysymToKeycode(KeySymsPt
 /* Event queue is shared between all devices. */
 #if XORG == 15
 static xEvent *eventq = NULL;
-#else
+#elif XORG < 111
 static EventList *eventq = NULL;
 #endif
 
+#if XORG < 111
 static void initEventq(void)
 {
 	/* eventq is never free()-ed because it exists during server life. */
@@ -100,7 +101,9 @@ static void initEventq(void)
 #endif
 	}
 }
+#endif /* XORG < 111 */
 
+#if XORG < 111
 static void enqueueEvents(DeviceIntPtr dev, int n)
 {
 	int i;
@@ -122,6 +125,7 @@ static void enqueueEvents(DeviceIntPtr d
 			   );
 	}
 }
+#endif /* XORG < 111 */
 
 InputDevice::InputDevice(rfb::VNCServerST *_server)
 	: server(_server), oldButtonMask(0)
@@ -141,12 +145,17 @@ InputDevice::InputDevice(rfb::VNCServerS
 				     keyboardProc, TRUE);
 	RegisterKeyboardDevice(keyboardDev);
 #endif
+#if XORG < 111
 	initEventq();
+#endif
 }
 
 void InputDevice::PointerButtonAction(int buttonMask)
 {
-	int i, n;
+	int i;
+#if XORG < 111
+	int n;
+#endif
 #if XORG >= 110
 	ValuatorMask mask;
 #endif
@@ -160,13 +169,17 @@ void InputDevice::PointerButtonAction(in
 #if XORG < 110
 			n = GetPointerEvents(eventq, pointerDev, action, i + 1,
 					     POINTER_RELATIVE, 0, 0, NULL);
-#else
+			enqueueEvents(pointerDev, n);
+#elif XORG < 111
 			valuator_mask_set_range(&mask, 0, 0, NULL);
 			n = GetPointerEvents(eventq, pointerDev, action, i + 1,
 					     POINTER_RELATIVE, &mask);
-#endif
 			enqueueEvents(pointerDev, n);
-
+#else
+			valuator_mask_set_range(&mask, 0, 0, NULL);
+			QueuePointerEvents(pointerDev, action, i + 1,
+					   POINTER_RELATIVE, &mask);
+#endif
 		}
 	}
 
@@ -175,7 +188,10 @@ void InputDevice::PointerButtonAction(in
 
 void InputDevice::PointerMove(const rfb::Point &pos)
 {
-	int n, valuators[2];
+	int valuators[2];
+#if XORG < 111
+	int n;
+#endif
 #if XORG >= 110
 	ValuatorMask mask;
 #endif
@@ -190,12 +206,16 @@ void InputDevice::PointerMove(const rfb:
 #if XORG < 110
 	n = GetPointerEvents(eventq, pointerDev, MotionNotify, 0, POINTER_ABSOLUTE, 0,
 			     2, valuators);
-#else
+	enqueueEvents(pointerDev, n);
+#elif XORG < 111
 	valuator_mask_set_range(&mask, 0, 2, valuators);
 	n = GetPointerEvents(eventq, pointerDev, MotionNotify, 0, POINTER_ABSOLUTE,
 			     &mask);
-#endif
 	enqueueEvents(pointerDev, n);
+#else
+	valuator_mask_set_range(&mask, 0, 2, valuators);
+	QueuePointerEvents(pointerDev, MotionNotify, 0, POINTER_ABSOLUTE, &mask);
+#endif
 
 	cursorPos = pos;
 }
@@ -299,14 +319,20 @@ void InputDevice::initInputDevice(void)
 static inline void pressKey(DeviceIntPtr dev, int kc, bool down, const char *msg)
 {
 	int action;
+#if XORG < 111
 	unsigned int n;
+#endif
 
 	if (msg != NULL)
 		vlog.debug("%s %d %s", msg, kc, down ? "down" : "up");
 
 	action = down ? KeyPress : KeyRelease;
-	n = GetKeyboardEvents(eventq, dev, action, kc);
+#if XORG < 111
+	n = GetKeyboardEvents(eventq, dev, action, kc, NULL);
 	enqueueEvents(dev, n);
+#else
+	QueueKeyboardEvents(dev, action, kc, NULL);
+#endif
 }
 
 #define IS_PRESSED(keyc, keycode) \
@@ -341,8 +367,11 @@ public:
 		int state, maxKeysPerMod, keycode;
 #if XORG >= 17
 		KeyCode *modmap = NULL;
+		DeviceIntPtr master;
 
-		state = XkbStateFieldFromRec(&dev->u.master->key->xkbInfo->state);
+		master = GetMaster(dev, MASTER_KEYBOARD);
+
+		state = XkbStateFieldFromRec(&master->key->xkbInfo->state);
 #else
 		KeyClassPtr keyc = dev->key;
 		state = keyc->state;
@@ -379,8 +408,10 @@ public:
 		KeyClassPtr keyc;
 #if XORG >= 17
 		KeyCode *modmap = NULL;
+		DeviceIntPtr master;
 
-		keyc = dev->u.master->key;
+		master = GetMaster(dev, MASTER_KEYBOARD);
+		keyc = master->key;
 		state = XkbStateFieldFromRec(&keyc->xkbInfo->state);
 #else
 		keyc = dev->key;
@@ -565,9 +596,7 @@ static inline int isModifier(KeySymsPtr
 
 void InputDevice::keyEvent(rdr::U32 keysym, bool down)
 {
-#if XORG < 17
 	DeviceIntPtr master;
-#endif
 	KeyClassPtr keyc;
 	KeySymsPtr keymap = NULL;
 	KeySym *map = NULL;
@@ -596,7 +625,8 @@ void InputDevice::keyEvent(rdr::U32 keys
 	}
 
 #if XORG >= 17
-	keyc = keyboardDev->u.master->key;
+	master = GetMaster(keyboardDev, MASTER_KEYBOARD);
+	keyc = master->key;
 
 	keymap = XkbGetCoreMap(keyboardDev);
 	if (!keymap) {
@@ -753,7 +783,7 @@ ModeSwitchFound:
 			XkbApplyMappingChange(keyboardDev, keymap, minKeyCode,
 					      maxKeyCode - minKeyCode + 1,
 					      NULL, serverClient);
-			XkbCopyDeviceKeymap(keyboardDev->u.master, keyboardDev);
+			XkbCopyDeviceKeymap(master, keyboardDev);
 #endif /* XORG < 17 */
 			break;
 		}
diff -up tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h.xorg111 tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h
--- tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h.xorg111	2011-08-09 23:16:36.000000000 +0200
+++ tigervnc-1.1.0/unix/xserver/hw/vnc/xorg-version.h	2011-09-12 16:51:36.958000000 +0200
@@ -36,6 +36,8 @@
 #define XORG 19
 #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (10 * 100000) + (99 * 1000))
 #define XORG 110
+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (11 * 100000) + (99 * 1000))
+#define XORG 111
 #else
 #error "X.Org newer than 1.10 is not supported"
 #endif
diff -up tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc.xorg111 tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc
--- tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc.xorg111	2011-08-09 23:16:36.000000000 +0200
+++ tigervnc-1.1.0/unix/xserver/hw/vnc/xvnc.cc	2011-09-14 13:49:23.751000543 +0200
@@ -211,7 +211,11 @@ static void vfbFreeFramebufferMemory(vfb
 
 extern "C" {
 
+#if XORG < 111
 void ddxGiveUp()
+#else
+void ddxGiveUp(enum ExitCode error)
+#endif
 {
     int i;
 
@@ -221,9 +225,17 @@ void ddxGiveUp()
 }
 
 void
+#if XORG < 111
 AbortDDX()
+#else
+AbortDDX(enum ExitCode error)
+#endif
 {
+#if XORG < 111
     ddxGiveUp();
+#else
+    ddxGiveUp(error);
+#endif
 }
 
 #ifdef __DARWIN__
@@ -668,8 +680,13 @@ vfbUninstallColormap(ColormapPtr pmap)
     {
 	if (pmap->mid != pmap->pScreen->defColormap)
 	{
+#if XORG < 111
 	    curpmap = (ColormapPtr) LookupIDByType(pmap->pScreen->defColormap,
 						   RT_COLORMAP);
+#else
+	    dixLookupResourceByType((pointer *) &curpmap, pmap->pScreen->defColormap,
+				    RT_COLORMAP, serverClient, DixUnknownAccess);
+#endif
 	    (*pmap->pScreen->InstallColormap)(curpmap);
 	}
     }





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-12 18:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-12 18:05 [gentoo-commits] gentoo-x86 commit in net-misc/tigervnc/files: xserver111.patch Raul Porcel (armin76)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox