diff options
author | B. Watson <yalhcru@gmail.com> | 2011-08-23 08:55:48 -0300 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-08-23 08:55:48 -0300 |
commit | 6b6c8ec350e3c15a4a374cb3580e227da34b03ac (patch) | |
tree | bc2d1bdddf2cd68ab45b4b7e6132c02bfcae89d5 /system/kegs/allow_window_close.diff | |
parent | 6b3dd7e2812a14275ad9c17c416f254b336df4ee (diff) | |
download | slackbuilds-6b6c8ec350e3c15a4a374cb3580e227da34b03ac.tar.gz |
system/kegs: Added (Kent's Emulated GS)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'system/kegs/allow_window_close.diff')
-rw-r--r-- | system/kegs/allow_window_close.diff | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/system/kegs/allow_window_close.diff b/system/kegs/allow_window_close.diff new file mode 100644 index 0000000000..538022e044 --- /dev/null +++ b/system/kegs/allow_window_close.diff @@ -0,0 +1,35 @@ +diff -Naur kegs.0.91/src/xdriver.c kegs.0.91.patched//src/xdriver.c +--- kegs.0.91/src/xdriver.c 2004-12-06 19:42:47.000000000 -0500 ++++ kegs.0.91.patched//src/xdriver.c 2011-01-27 04:28:42.000000000 -0500 +@@ -57,6 +57,7 @@ + Display *g_display = 0; + Visual *g_vis = 0; + Window g_a2_win; ++Atom g_wmdelete_atom; + GC g_a2_winGC; + XFontStruct *g_text_FontSt; + Colormap g_a2_colormap = 0; +@@ -582,6 +583,9 @@ + 0, &my_winSizeHints, 0, &my_winClassHint); + XMapRaised(g_display, g_a2_win); + ++ g_wmdelete_atom = XInternAtom(g_display, "WM_DELETE_WINDOW", True); ++ XSetWMProtocols(g_display, g_a2_win, &g_wmdelete_atom, 1); ++ + XSync(g_display, False); + + g_a2_winGC = XCreateGC(g_display, g_a2_win, 0, (XGCValues *) 0); +@@ -1086,6 +1090,13 @@ + (word32)ev.xcolormap.colormap, + ev.xcolormap.new, ev.xcolormap.state); + break; ++ case ClientMessage: ++ if(ev.xclient.data.l[0] == g_wmdelete_atom) { ++ x_auto_repeat_on(1); ++ XCloseDisplay(g_display); ++ exit(0); ++ } ++ break; + default: + printf("X event 0x%08x is unknown!\n", + ev.type); |