[arch-commits] Commit in fcitx/trunk (PKGBUILD fcitx362-qt46.patch)

Eric Bélanger eric at archlinux.org
Fri Feb 12 09:01:18 UTC 2010


    Date: Friday, February 12, 2010 @ 04:01:17
  Author: eric
Revision: 68268

upgpkg: fcitx 3.6.2-2
Fixed uncompatibility with QT 4.6 when desktop effects are enabled (close FS#18283)

Added:
  fcitx/trunk/fcitx362-qt46.patch
Modified:
  fcitx/trunk/PKGBUILD

---------------------+
 PKGBUILD            |    9 +++---
 fcitx362-qt46.patch |   67 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-02-12 06:29:02 UTC (rev 68267)
+++ PKGBUILD	2010-02-12 09:01:17 UTC (rev 68268)
@@ -4,18 +4,19 @@
 
 pkgname=fcitx
 pkgver=3.6.2
-pkgrel=1
+pkgrel=2
 pkgdesc="Free Chinese Input Toy of X - Input Method Server for X window system (XIM)"
 arch=('i686' 'x86_64')
 url="http://www.fcitx.org/"
 license=('GPL')
 depends=('libxft' 'libxpm' 'libxtst')
-source=(http://www.fcitx.org/download/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('6a66cda4a8221f1d6685e5a400d8763e')
-sha1sums=('3772b0883725c0fc3a9fe189db2dc7ff3b2de89c')
+source=(http://www.fcitx.org/download/${pkgname}-${pkgver}.tar.bz2 fcitx362-qt46.patch)
+md5sums=('6a66cda4a8221f1d6685e5a400d8763e' 'ae0ffe354cb062fbef05ecde89fa4243')
+sha1sums=('3772b0883725c0fc3a9fe189db2dc7ff3b2de89c' '83f9b378f1480dafeb970302597abaf3eb58a34b')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
+  patch -p1 < ../fcitx362-qt46.patch || return 1
   ./configure --prefix=/usr || return 1
   make || return 1
   make DESTDIR="${pkgdir}" install || return 1

Added: fcitx362-qt46.patch
===================================================================
--- fcitx362-qt46.patch	                        (rev 0)
+++ fcitx362-qt46.patch	2010-02-12 09:01:17 UTC (rev 68268)
@@ -0,0 +1,67 @@
+diff -Naur fcitx-3.6.2-orig/src/main.c fcitx-3.6.2/src/main.c
+--- fcitx-3.6.2-orig/src/main.c	2009-05-26 11:54:49.000000000 -0400
++++ fcitx-3.6.2/src/main.c	2010-02-12 00:09:23.000000000 -0500
+@@ -66,7 +66,7 @@
+ #endif
+ 
+ extern Display *dpy;
+-extern Window   inputWindow;
++extern Window   mainWindow;
+ 
+ extern Bool     bIsUtf8;
+ 
+@@ -147,7 +148,7 @@
+     CreateAboutWindow ();	//´´½¨¹ØÓÚ´°¿Ú
+ 
+     //´¦ÀíÑÕÉ«£¬¼´ºòÑ¡´Ê´°¿ÚµÄÑÕÉ«£¬Ò²¾ÍÊÇÎÒÃÇÔÚ¡°~/.fcitx/config¡±¶¨ÒåµÄÄÇЩÑÕÉ«ÐÅÏ¢
+-    InitGC (inputWindow);
++    InitGC (mainWindow);
+ 
+     //½«±¾³ÌÐò¼ÓÈëµ½ÊäÈë·¨×飬¸æËßϵͳ£¬Ê¹ÓÃÎÒÊäÈë×Ö·û
+     SetIM ();
+@@ -159,7 +160,7 @@
+     }
+     
+     //³õʼ»¯ÊäÈë·¨
+-    if (!InitXIM (inputWindow, imname))
++    if (!InitXIM (imname))
+ 	exit (4);
+ 
+     //ÒÔºǫ́·½Ê½ÔËÐÐ
+diff -Naur fcitx-3.6.2-orig/src/xim.c fcitx-3.6.2/src/xim.c
+--- fcitx-3.6.2-orig/src/xim.c	2009-09-14 20:21:15.000000000 -0400
++++ fcitx-3.6.2/src/xim.c	2010-02-12 00:12:45.000000000 -0500
+@@ -463,12 +463,20 @@
+ 	free (pS2T);
+ }
+ 
+-Bool InitXIM (Window im_window, char *imname)
++Bool InitXIM (char *imname)
+ {
+     XIMStyles      *input_styles;
+     XIMTriggerKeys *on_keys;
+     XIMEncodings   *encodings;
+     char           *p;
++    Window	    im_window;
++ 
++    im_window = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, 1, 1, 1, 0, 0);
++    if (im_window == (Window)NULL) {
++      fprintf(stderr, "Can't Create imWindow\n");
++      exit(1);
++    }
++    XSelectInput(dpy, im_window, ExposureMask|ButtonPressMask|ButtonReleaseMask|ButtonMotionMask|VisibilityChangeMask);
+ 
+     if ( !imname ) {
+     	imname = getenv ("XMODIFIERS");
+diff -Naur fcitx-3.6.2-orig/src/xim.h fcitx-3.6.2/src/xim.h
+--- fcitx-3.6.2-orig/src/xim.h	2009-08-11 05:33:51.000000000 -0400
++++ fcitx-3.6.2/src/xim.h	2010-02-12 00:13:21.000000000 -0500
+@@ -66,7 +66,7 @@
+     position		pos;
+ } CONNECT_ID;
+ 
+-Bool            InitXIM (Window, char *);
++Bool            InitXIM (char *);
+ void            SendHZtoClient (IMForwardEventStruct * call_data, char *strHZ);
+ void            EnterChineseMode (Bool bState);
+ void            CreateConnectID (IMOpenStruct * call_data);




More information about the arch-commits mailing list