Mercurial > kinput2.yaz
diff lib/OffConv.c @ 3:e55ccba56891
imported patch 05_kinput2-v3.1-wm_state_above.patch
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 08 Mar 2010 20:07:06 +0900 |
parents | 92745d501b9a |
children | 5b1d5c19f325 |
line wrap: on
line diff
--- a/lib/OffConv.c Mon Mar 08 20:07:05 2010 +0900 +++ b/lib/OffConv.c Mon Mar 08 20:07:06 2010 +0900 @@ -28,6 +28,7 @@ #if XtSpecificationRelease > 4 #include <X11/Xfuncs.h> #endif +#include <X11/Xatom.h> #include "CachedAtom.h" #include "AsyncErr.h" #include "OffConvP.h" @@ -1069,6 +1070,9 @@ int kind; { Cardinal ncand; + Atom wm_state, atom; + unsigned long data[2]; + Display *dpy; TRACE(("OffTheSpotConversion:SelectionStart()\n")); if (ocw->offthespot.selectionpoppedup) { @@ -1089,6 +1093,14 @@ XtPopup(ocw->offthespot.selectionshell, XtGrabNone); ocw->offthespot.selectionpoppedup = True; + /* force to be set _NET_WM_STATE_ABOVE, because the candidate window + * always should be shown above anything window. + */ + dpy = XtDisplay ((Widget) ocw); + wm_state = CachedInternAtom (dpy, "_NET_WM_STATE", True); + atom = CachedInternAtom (dpy, "_NET_WM_STATE_ABOVE", True); + data[0] = atom; + XChangeProperty (dpy, XtWindow (ocw->offthespot.selectionshell), wm_state, XA_ATOM, 32, PropModeAppend, data, 1); } static void