changeset 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 7353de876e93
files lib/OffConv.c lib/OnConv.c lib/OverConv.c
diffstat 3 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib/OffConv.c	Mon Mar 08 20:07:06 2010 +0900
+++ b/lib/OffConv.c	Mon Mar 08 20:07:06 2010 +0900
@@ -1070,7 +1070,7 @@
 int kind;
 {
     Cardinal ncand;
-    Atom wm_state, atom;
+    Atom wm_state, atom, protocols[1];
     unsigned long data[2];
     Display *dpy;
 
@@ -1101,6 +1101,8 @@
     atom = CachedInternAtom (dpy, "_NET_WM_STATE_ABOVE", True);
     data[0] = atom;
     XChangeProperty (dpy, XtWindow (ocw->offthespot.selectionshell), wm_state, XA_ATOM, 32, PropModeAppend, data, 1);
+    protocols[0] = CachedInternAtom (dpy, "WM_DELETE_WINDOW", True);
+    XSetWMProtocols (dpy, XtWindow (ocw->offthespot.selectionshell), protocols, 1);
 }
 
 static void
--- a/lib/OnConv.c	Mon Mar 08 20:07:06 2010 +0900
+++ b/lib/OnConv.c	Mon Mar 08 20:07:06 2010 +0900
@@ -762,7 +762,7 @@
 int kind;
 {
     Cardinal ncand;
-    Atom wm_state, atom;
+    Atom wm_state, atom, protocols[1];
     unsigned long data[2];
     Display *dpy;
 
@@ -791,6 +791,8 @@
     atom = CachedInternAtom (dpy, "_NET_WM_STATE_ABOVE", True);
     data[0] = atom;
     XChangeProperty (dpy, XtWindow (ocw->onthespot.selectionshell), wm_state, XA_ATOM, 32, PropModeAppend, data, 1);
+    protocols[0] = CachedInternAtom (dpy, "WM_DELETE_WINDOW", True);
+    XSetWMProtocols (dpy, XtWindow (ocw->onthespot.selectionshell), protocols, 1);
 }
 
 /*- LocateSelectionPopup: put selection popup at an appropriate position -*/
--- a/lib/OverConv.c	Mon Mar 08 20:07:06 2010 +0900
+++ b/lib/OverConv.c	Mon Mar 08 20:07:06 2010 +0900
@@ -1279,7 +1279,7 @@
 int kind;
 {
     Cardinal ncand;
-    Atom wm_state, atom;
+    Atom wm_state, atom, protocols[1];
     unsigned long data[2];
     Display *dpy;
 
@@ -1308,6 +1308,8 @@
     atom = CachedInternAtom (dpy, "_NET_WM_STATE_ABOVE", True);
     data[0] = atom;
     XChangeProperty (dpy, XtWindow (ocw->overthespot.selectionshell), wm_state, XA_ATOM, 32, PropModeAppend, data, 1);
+    protocols[0] = CachedInternAtom (dpy, "WM_DELETE_WINDOW", True);
+    XSetWMProtocols (dpy, XtWindow (ocw->overthespot.selectionshell), protocols, 1);
 }
 
 /*- locateSelectionPopup: put selection popup at an appropriate position -*/