# HG changeset patch # User Yoshiki Yazawa # Date 1268046426 -32400 # Node ID e55ccba56891e3b570fe335fac2e154926f1e8ea # Parent 115737ec00413cecfa74692ac5be33fafe797480 imported patch 05_kinput2-v3.1-wm_state_above.patch diff -r 115737ec0041 -r e55ccba56891 lib/OffConv.c --- 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 #endif +#include #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 diff -r 115737ec0041 -r e55ccba56891 lib/OnConv.c --- a/lib/OnConv.c Mon Mar 08 20:07:05 2010 +0900 +++ b/lib/OnConv.c Mon Mar 08 20:07:06 2010 +0900 @@ -27,6 +27,7 @@ #if XtSpecificationRelease > 4 #include #endif +#include #include "CachedAtom.h" #include "AsyncErr.h" #include "OnConvP.h" @@ -761,6 +762,9 @@ int kind; { Cardinal ncand; + Atom wm_state, atom; + unsigned long data[2]; + Display *dpy; TRACE(("OnTheSpotConversion:SelectionStart()\n")); if (ocw->onthespot.selectionpoppedup) { @@ -779,6 +783,14 @@ LocateSelectionPopup(ocw); XtPopup(ocw->onthespot.selectionshell, XtGrabNone); ocw->onthespot.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->onthespot.selectionshell), wm_state, XA_ATOM, 32, PropModeAppend, data, 1); } /*- LocateSelectionPopup: put selection popup at an appropriate position -*/ diff -r 115737ec0041 -r e55ccba56891 lib/OverConv.c --- 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 #endif +#include #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 -*/