Mercurial > kinput2.yaz
comparison lib/OnConv.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 | 55ed5c42c22f |
comparison
equal
deleted
inserted
replaced
17:688ac5040e7d | 18:07a41a882b14 |
---|---|
36 #include "AuxPanel.h" | 36 #include "AuxPanel.h" |
37 #include "ICLabel.h" | 37 #include "ICLabel.h" |
38 | 38 |
39 #define DEBUG_VAR debug_OnTheSpotConversion | 39 #define DEBUG_VAR debug_OnTheSpotConversion |
40 #include "DebugPrint.h" | 40 #include "DebugPrint.h" |
41 | |
42 #define CloseWindowProtection(w) \ | |
43 {\ | |
44 Atom protocols;\ | |
45 protocols = XInternAtom(XtDisplay(w), "WM_DELETE_WINDOW", False);\ | |
46 XSetWMProtocols(XtDisplay(w), XtWindow(w), &protocols, 1);\ | |
47 } | |
48 | |
41 | 49 |
42 /*- resource table -*/ | 50 /*- resource table -*/ |
43 static XtResource resources[] = { | 51 static XtResource resources[] = { |
44 #define offset(field) XtOffset(OnTheSpotConversionWidget, onthespot.field) | 52 #define offset(field) XtOffset(OnTheSpotConversionWidget, onthespot.field) |
45 { XtNpreeditStartCallback, XtCCallback, XtRCallback, sizeof(XtCallbackList), | 53 { XtNpreeditStartCallback, XtCCallback, XtRCallback, sizeof(XtCallbackList), |
776 ocw->onthespot.candlist, | 784 ocw->onthespot.candlist, |
777 ocw->onthespot.numcands, 0, True); | 785 ocw->onthespot.numcands, 0, True); |
778 | 786 |
779 LocateSelectionPopup(ocw); | 787 LocateSelectionPopup(ocw); |
780 XtPopup(ocw->onthespot.selectionshell, XtGrabNone); | 788 XtPopup(ocw->onthespot.selectionshell, XtGrabNone); |
789 CloseWindowProtection(ocw->onthespot.selectionshell); | |
781 ocw->onthespot.selectionpoppedup = True; | 790 ocw->onthespot.selectionpoppedup = True; |
782 } | 791 } |
783 | 792 |
784 /*- LocateSelectionPopup: put selection popup at an appropriate position -*/ | 793 /*- LocateSelectionPopup: put selection popup at an appropriate position -*/ |
785 static void | 794 static void |
950 | 959 |
951 /* ポップウ髟阡札奪廚垢襴苳詞所を決める */ | 960 /* ポップウ髟阡札奪廚垢襴苳詞所を決める */ |
952 LocateAuxPopup(ocw); | 961 LocateAuxPopup(ocw); |
953 | 962 |
954 XtPopup(ocw->onthespot.auxshell, XtGrabNone); | 963 XtPopup(ocw->onthespot.auxshell, XtGrabNone); |
964 CloseWindowProtection(ocw->onthespot.auxshell); | |
955 ocw->onthespot.auxpoppedup = True; | 965 ocw->onthespot.auxpoppedup = True; |
956 } | 966 } |
957 | 967 |
958 /* ARGSUSED */ | 968 /* ARGSUSED */ |
959 static void | 969 static void |