File 0001--XIM-Revert-commit-1a1a42a3.patch of Package xorg-x11-libX11

From f0bad274d885da555c25437614aea0882d1a9986 Mon Sep 17 00:00:00 2001
From: Egbert Eich <eich@freedesktop.org>
Date: Wed, 29 Jun 2011 10:35:58 +0200
Subject: [PATCH] [XIM] Revert commit 1a1a42a3.
Patch-mainline: To be upstreamed

According to https://bugs.freedesktop.org/show_bug.cgi?id=7869
this patch did not resolve the issue.
The ticket suggests another solution to this problem however
this solution has the side effect that a 'FABLICATED' event
may be delivered to the wron input context.
The real problem however seems to reside on the client side:
as comment #12 of this ticket:
"So the client should not change the focus between XNextEvent() and
XFilterEvent(), if they pass the ic client window to XFilterEvent()."
It seems to be wrong to fix a client issue on the library side.
As no more comments have appeard on this bug over the past 2
years I expect that this is what has happened already.

Signed-off-by: Egbert Eich <eich@freedesktop.org>
---
 modules/im/ximcp/imDefIc.c   |    4 ----
 modules/im/ximcp/imDefLkup.c |    8 ++------
 src/xlibi18n/XimintP.h       |    8 --------
 3 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/modules/im/ximcp/imDefIc.c b/modules/im/ximcp/imDefIc.c
index 7b36659..2e71d84 100644
--- a/modules/im/ximcp/imDefIc.c
+++ b/modules/im/ximcp/imDefIc.c
@@ -993,8 +993,6 @@ _XimProtoSetFocus(
     (void)_XimWrite(im, len, (XPointer)buf);
     _XimFlush(im);
 
-    MARK_FOCUSED(ic);
-
     _XimRegisterFilter(ic);
     return;
 }
@@ -1042,8 +1040,6 @@ _XimProtoUnsetFocus(
     (void)_XimWrite(im, len, (XPointer)buf);
     _XimFlush(im);
 
-    UNMARK_FOCUSED(ic);
-
     _XimUnregisterFilter(ic);
     return;
 }
diff --git a/modules/im/ximcp/imDefLkup.c b/modules/im/ximcp/imDefLkup.c
index 45c46e6..29b45db 100644
--- a/modules/im/ximcp/imDefLkup.c
+++ b/modules/im/ximcp/imDefLkup.c
@@ -213,12 +213,8 @@ _XimRespSyncReply(
     Xic		 ic,
     BITMASK16	 mode)
 {
-    if (mode & XimSYNCHRONUS) /* SYNC Request */ {
-	if (IS_FOCUSED(ic))
-	    MARK_NEED_SYNC_REPLY(ic);
-	else
-	    _XimProcSyncReply((Xim)ic->core.im, ic);
-    }
+    if (mode & XimSYNCHRONUS) /* SYNC Request */
+        MARK_NEED_SYNC_REPLY(ic);
 
     return True;
 }
diff --git a/src/xlibi18n/XimintP.h b/src/xlibi18n/XimintP.h
index 0e384ab..8ea06ba 100644
--- a/src/xlibi18n/XimintP.h
+++ b/src/xlibi18n/XimintP.h
@@ -261,7 +261,6 @@ typedef struct _XicProtoPrivateRec {
 #define IC_CONNECTED		(1L)
 #define FABLICATED		(1L << 1)
 #define	NEED_SYNC_REPLY		(1L << 2)
-#define FOCUSED			(1L << 3)
 
 /*
  * macro for the flag of XICPrivateRec
@@ -287,13 +286,6 @@ typedef struct _XicProtoPrivateRec {
 #define	UNMARK_NEED_SYNC_REPLY(ic) \
 		(((Xic)ic)->private.proto.flag &= ~NEED_SYNC_REPLY)
 
-#define IS_FOCUSED(ic) \
-		(((Xic)ic)->private.proto.flag & FOCUSED)
-#define MARK_FOCUSED(ic) \
-		(((Xic)ic)->private.proto.flag |= FOCUSED)
-#define UNMARK_FOCUSED(ic) \
-		(((Xic)ic)->private.proto.flag &= ~FOCUSED)
-
 /*
  * macro for the filter_event_mask of XICPrivateRec
  */
-- 
1.6.0.2

openSUSE Build Service is sponsored by