# HG changeset patch # User Yoshiki Yazawa # Date 1268046426 -32400 # Node ID 5b1d5c19f3254c074a631a758316a681f735b88e # Parent e55ccba56891e3b570fe335fac2e154926f1e8ea imported patch 06_kinput2-v3.1-wm_delete_window.patch diff -r e55ccba56891 -r 5b1d5c19f325 lib/OffConv.c --- 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 diff -r e55ccba56891 -r 5b1d5c19f325 lib/OnConv.c --- 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 -*/ diff -r e55ccba56891 -r 5b1d5c19f325 lib/OverConv.c --- 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 -*/