[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tigervnc-commits
Subject:    [Tigervnc-commits] SF.net SVN: tigervnc:[3925]
From:       astrand () users ! sourceforge ! net
Date:       2009-12-09 12:31:35
Message-ID: E1NILhf-0005yH-PE () 74yxhf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 3925
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=3925&view=rev
Author:   astrand
Date:     2009-12-09 12:31:35 +0000 (Wed, 09 Dec 2009)

Log Message:
-----------
Avoid modifiers such as shift sticking. 

Modified Paths:
--------------
    branches/1_0/unix/xserver/hw/vnc/XserverDesktop.cc

Modified: branches/1_0/unix/xserver/hw/vnc/XserverDesktop.cc
===================================================================
--- branches/1_0/unix/xserver/hw/vnc/XserverDesktop.cc	2009-12-09 12:28:19 UTC (rev \
                3924)
+++ branches/1_0/unix/xserver/hw/vnc/XserverDesktop.cc	2009-12-09 12:31:35 UTC (rev \
3925) @@ -1104,6 +1104,14 @@
   unsigned int i, n;
   int j, k;
 
+  /* 
+   * Since we are checking the current state to determine if we need
+   * to fake modifiers, we must make sure that everything put on the
+   * input queue is processed before we start. Otherwise, shift may be
+   * stuck down.
+   */ 
+  mieqProcessInputEvents();
+
   if (keysym == XK_Caps_Lock) {
     vlog.debug("Ignoring caps lock");
     return;
@@ -1220,6 +1228,15 @@
 #endif
     );
   }
+
+  /*
+   * When faking a modifier we are putting a keycode (which can
+   * currently activate the desired modifier) on the input
+   * queue. A future modmap change can change the mapping so
+   * that this keycode means something else entirely. Guard
+   * against this by processing the queue now.
+   */
+  mieqProcessInputEvents();
 }
 
 static KeySym KeyCodetoKeySym(KeySymsPtr keymap, int keycode, int col)


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

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic