Mercurial > kinput2.yaz
changeset 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 | 688ac5040e7d |
children | 55ed5c42c22f |
files | lib/OffConv.c lib/OnConv.c lib/OverConv.c |
diffstat | 3 files changed, 31 insertions(+), 0 deletions(-) [+] |
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; }
--- a/lib/OnConv.c Mon Mar 08 20:38:17 2010 +0900 +++ b/lib/OnConv.c Mon Mar 08 20:38:17 2010 +0900 @@ -39,6 +39,14 @@ #define DEBUG_VAR debug_OnTheSpotConversion #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 -*/ static XtResource resources[] = { #define offset(field) XtOffset(OnTheSpotConversionWidget, onthespot.field) @@ -778,6 +786,7 @@ LocateSelectionPopup(ocw); XtPopup(ocw->onthespot.selectionshell, XtGrabNone); + CloseWindowProtection(ocw->onthespot.selectionshell); ocw->onthespot.selectionpoppedup = True; } @@ -952,6 +961,7 @@ LocateAuxPopup(ocw); XtPopup(ocw->onthespot.auxshell, XtGrabNone); + CloseWindowProtection(ocw->onthespot.auxshell); ocw->onthespot.auxpoppedup = True; }
--- a/lib/OverConv.c Mon Mar 08 20:38:17 2010 +0900 +++ b/lib/OverConv.c Mon Mar 08 20:38:17 2010 +0900 @@ -37,6 +37,13 @@ #define DEBUG_VAR debug_OverTheSpotConversion #include "DebugPrint.h" +#define CloseWindowProtection(w) \ + {\ + Atom protocols;\ + protocols = XInternAtom(XtDisplay(w), "WM_DELETE_WINDOW", False);\ + XSetWMProtocols(XtDisplay(w), XtWindow(w), &protocols, 1);\ + } + typedef enum { NeedNone, NeedRedraw, NeedReconfig } ResetStatus; /*- resource table -*/ @@ -1295,6 +1302,7 @@ locateSelectionPopup(ocw); XtPopup(ocw->overthespot.selectionshell, XtGrabNone); + CloseWindowProtection(ocw->overthespot.selectionshell); ocw->overthespot.selectionpoppedup = True; } @@ -1504,6 +1512,7 @@ locateAuxPopup(ocw, False); XtPopup(ocw->overthespot.auxshell, XtGrabNone); + CloseWindowProtection(ocw->overthespot.auxshell) ocw->overthespot.auxpoppedup = True; }