Mercurial > kinput2.yaz
diff lib/OffConv.c @ 18:07a41a882b14
imported patch 21_kinput2-v3.1-rootwindow-1.patch
| author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
|---|---|
| date | Mon, 08 Mar 2010 20:38:17 +0900 |
| parents | 92745d501b9a |
| children |
line wrap: on
line diff
--- a/lib/OffConv.c Mon Mar 08 20:38:17 2010 +0900 +++ b/lib/OffConv.c Mon Mar 08 20:38:17 2010 +0900 @@ -44,6 +44,14 @@ #define DEBUG_VAR debug_OffTheSpotConversion #include "DebugPrint.h" +#define CloseWindowProtection(w) \ + {\ + Atom protocols;\ + protocols = XInternAtom(XtDisplay(w), "WM_DELETE_WINDOW", False);\ + XSetWMProtocols(XtDisplay(w), XtWindow(w), &protocols, 1);\ + } + + /*- resource table for OffTheSpotConversion (SeparateConversion has no resources -*/ static XtResource off_resources[] = { #define offset(field) XtOffset(OffTheSpotConversionWidget, offthespot.field) @@ -619,6 +627,7 @@ /* $B%]%C%W%"%C%W$9$k(B */ XtPopup(widget, XtGrabNone); + CloseWindowProtection(widget); } /*- Separate_ConversionFinish: Separate conversion finish -*/ @@ -1024,6 +1033,7 @@ XtVaSetValues(ocw->offthespot.modewidget, XtNlabel, ICGetMode(ocw->ccontrol.inputobj), NULL); + TRACE(("OffTheSpotConversion:UpdateMode():end\n")); } static void @@ -1088,6 +1098,7 @@ LocateSelectionPopup(ocw); XtPopup(ocw->offthespot.selectionshell, XtGrabNone); + CloseWindowProtection(ocw->offthespot.selectionshell); ocw->offthespot.selectionpoppedup = True; } @@ -1253,6 +1264,7 @@ LocateAuxPopup(ocw); XtPopup(ocw->offthespot.auxshell, XtGrabNone); + CloseWindowProtection(ocw->offthespot.auxshell); ocw->offthespot.auxpoppedup = True; }
