Mercurial > kinput2.yaz
diff lib/OverConv.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/OverConv.c Mon Mar 08 20:07:05 2010 +0900 +++ b/lib/OverConv.c Mon Mar 08 20:07:06 2010 +0900 @@ -24,6 +24,7 @@ #if XtSpecificationRelease > 4 #include <X11/Xfuncs.h> #endif +#include <X11/Xatom.h> #include "CachedAtom.h" #include "AsyncErr.h" #include "OverConvP.h" @@ -1278,6 +1279,9 @@ int kind; { Cardinal ncand; + Atom wm_state, atom; + unsigned long data[2]; + Display *dpy; TRACE(("OverTheSpotConversion:SelectionStart()\n")); if (ocw->overthespot.selectionpoppedup) { @@ -1296,6 +1300,14 @@ locateSelectionPopup(ocw); XtPopup(ocw->overthespot.selectionshell, XtGrabNone); ocw->overthespot.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->overthespot.selectionshell), wm_state, XA_ATOM, 32, PropModeAppend, data, 1); } /*- locateSelectionPopup: put selection popup at an appropriate position -*/