Revision: 5070
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=5070&view=rev
Author:   ossman_
Date:     2013-04-09 15:01:56 +0000 (Tue, 09 Apr 2013)
Log Message:
-----------
We have an object to store stuff in, so don't use a global
variable.

Modified Paths:
--------------
    trunk/unix/xserver/hw/vnc/Input.cc
    trunk/unix/xserver/hw/vnc/Input.h

Modified: trunk/unix/xserver/hw/vnc/Input.cc
===================================================================
--- trunk/unix/xserver/hw/vnc/Input.cc  2013-04-09 14:59:31 UTC (rev 5069)
+++ trunk/unix/xserver/hw/vnc/Input.cc  2013-04-09 15:01:56 UTC (rev 5070)
@@ -128,7 +128,7 @@
 #endif /* XORG < 111 */
 
 InputDevice::InputDevice(rfb::VNCServerST *_server)
-       : server(_server), oldButtonMask(0)
+       : server(_server), initialized(false), oldButtonMask(0)
 {
 #if XORG < 17
        pointerDev = AddInputDevice(
@@ -287,12 +287,11 @@
 {
 #if XORG >= 17
        int ret;
-       static int initialized = 0;
 
-       if (initialized != 0)
+       if (!initialized)
                return;
 
-       initialized = 1;
+       initialized = true;
 
        ret = AllocDevicePair(serverClient, "TigerVNC", &pointerDev,
                              &keyboardDev, pointerProc, keyboardProc,

Modified: trunk/unix/xserver/hw/vnc/Input.h
===================================================================
--- trunk/unix/xserver/hw/vnc/Input.h   2013-04-09 14:59:31 UTC (rev 5069)
+++ trunk/unix/xserver/hw/vnc/Input.h   2013-04-09 15:01:56 UTC (rev 5070)
@@ -71,6 +71,7 @@
        void keyEvent(rdr::U32 keysym, bool down);
 
        rfb::VNCServerST *server;
+       bool initialized;
        DeviceIntPtr keyboardDev;
        DeviceIntPtr pointerDev;
        int oldButtonMask;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to