Mercurial > kinput2.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
2:115737ec0041 | 3:e55ccba56891 |
---|---|
26 #include <X11/IntrinsicP.h> | 26 #include <X11/IntrinsicP.h> |
27 #include <X11/StringDefs.h> | 27 #include <X11/StringDefs.h> |
28 #if XtSpecificationRelease > 4 | 28 #if XtSpecificationRelease > 4 |
29 #include <X11/Xfuncs.h> | 29 #include <X11/Xfuncs.h> |
30 #endif | 30 #endif |
31 #include <X11/Xatom.h> | |
31 #include "CachedAtom.h" | 32 #include "CachedAtom.h" |
32 #include "AsyncErr.h" | 33 #include "AsyncErr.h" |
33 #include "OffConvP.h" | 34 #include "OffConvP.h" |
34 #include <X11/Xaw/Form.h> | 35 #include <X11/Xaw/Form.h> |
35 #include "InputConv.h" | 36 #include "InputConv.h" |
1067 SelectionStart(ocw, kind) | 1068 SelectionStart(ocw, kind) |
1068 OffTheSpotConversionWidget ocw; | 1069 OffTheSpotConversionWidget ocw; |
1069 int kind; | 1070 int kind; |
1070 { | 1071 { |
1071 Cardinal ncand; | 1072 Cardinal ncand; |
1073 Atom wm_state, atom; | |
1074 unsigned long data[2]; | |
1075 Display *dpy; | |
1072 | 1076 |
1073 TRACE(("OffTheSpotConversion:SelectionStart()\n")); | 1077 TRACE(("OffTheSpotConversion:SelectionStart()\n")); |
1074 if (ocw->offthespot.selectionpoppedup) { | 1078 if (ocw->offthespot.selectionpoppedup) { |
1075 TRACE(("\tselection already started -- ignored\n")); | 1079 TRACE(("\tselection already started -- ignored\n")); |
1076 return; | 1080 return; |
1087 /* ポップウ髟阡札奪廚垢襴苳詞所を決める */ | 1091 /* ポップウ髟阡札奪廚垢襴苳詞所を決める */ |
1088 LocateSelectionPopup(ocw); | 1092 LocateSelectionPopup(ocw); |
1089 | 1093 |
1090 XtPopup(ocw->offthespot.selectionshell, XtGrabNone); | 1094 XtPopup(ocw->offthespot.selectionshell, XtGrabNone); |
1091 ocw->offthespot.selectionpoppedup = True; | 1095 ocw->offthespot.selectionpoppedup = True; |
1096 /* force to be set _NET_WM_STATE_ABOVE, because the candidate window | |
1097 * always should be shown above anything window. | |
1098 */ | |
1099 dpy = XtDisplay ((Widget) ocw); | |
1100 wm_state = CachedInternAtom (dpy, "_NET_WM_STATE", True); | |
1101 atom = CachedInternAtom (dpy, "_NET_WM_STATE_ABOVE", True); | |
1102 data[0] = atom; | |
1103 XChangeProperty (dpy, XtWindow (ocw->offthespot.selectionshell), wm_state, XA_ATOM, 32, PropModeAppend, data, 1); | |
1092 } | 1104 } |
1093 | 1105 |
1094 static void | 1106 static void |
1095 LocateSelectionPopup(ocw) | 1107 LocateSelectionPopup(ocw) |
1096 OffTheSpotConversionWidget ocw; | 1108 OffTheSpotConversionWidget ocw; |