comparison lib/OffConv.c @ 4:5b1d5c19f325

imported patch 06_kinput2-v3.1-wm_delete_window.patch
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 08 Mar 2010 20:07:06 +0900
parents e55ccba56891
children
comparison
equal deleted inserted replaced
3:e55ccba56891 4:5b1d5c19f325
1068 SelectionStart(ocw, kind) 1068 SelectionStart(ocw, kind)
1069 OffTheSpotConversionWidget ocw; 1069 OffTheSpotConversionWidget ocw;
1070 int kind; 1070 int kind;
1071 { 1071 {
1072 Cardinal ncand; 1072 Cardinal ncand;
1073 Atom wm_state, atom; 1073 Atom wm_state, atom, protocols[1];
1074 unsigned long data[2]; 1074 unsigned long data[2];
1075 Display *dpy; 1075 Display *dpy;
1076 1076
1077 TRACE(("OffTheSpotConversion:SelectionStart()\n")); 1077 TRACE(("OffTheSpotConversion:SelectionStart()\n"));
1078 if (ocw->offthespot.selectionpoppedup) { 1078 if (ocw->offthespot.selectionpoppedup) {
1099 dpy = XtDisplay ((Widget) ocw); 1099 dpy = XtDisplay ((Widget) ocw);
1100 wm_state = CachedInternAtom (dpy, "_NET_WM_STATE", True); 1100 wm_state = CachedInternAtom (dpy, "_NET_WM_STATE", True);
1101 atom = CachedInternAtom (dpy, "_NET_WM_STATE_ABOVE", True); 1101 atom = CachedInternAtom (dpy, "_NET_WM_STATE_ABOVE", True);
1102 data[0] = atom; 1102 data[0] = atom;
1103 XChangeProperty (dpy, XtWindow (ocw->offthespot.selectionshell), wm_state, XA_ATOM, 32, PropModeAppend, data, 1); 1103 XChangeProperty (dpy, XtWindow (ocw->offthespot.selectionshell), wm_state, XA_ATOM, 32, PropModeAppend, data, 1);
1104 protocols[0] = CachedInternAtom (dpy, "WM_DELETE_WINDOW", True);
1105 XSetWMProtocols (dpy, XtWindow (ocw->offthespot.selectionshell), protocols, 1);
1104 } 1106 }
1105 1107
1106 static void 1108 static void
1107 LocateSelectionPopup(ocw) 1109 LocateSelectionPopup(ocw)
1108 OffTheSpotConversionWidget ocw; 1110 OffTheSpotConversionWidget ocw;