Index: ui/xlib/xui.c
===================================================================
--- ui/xlib/xui.c (revision 4651)
+++ ui/xlib/xui.c (working copy)
@@ -33,6 +33,7 @@
#include "display.h"
#include "fuse.h"
#include "keyboard.h"
+#include "menu.h"
#include "settings.h"
#include "ui/ui.h"
#include "ui/uidisplay.h"
@@ -146,6 +147,12 @@
XSetWMProperties(display, xui_mainWindow, &windowName, &iconName,
*argv, *argc, sizeHints, wmHints, classHint);
+ XFree( windowName.value );
+ XFree( iconName.value );
+ XFree( sizeHints );
+ XFree( wmHints );
+ XFree( classHint );
+
/* Ask the server to use its backing store for this window */
windowFlags=CWBackingStore;
@@ -195,7 +202,10 @@
{
XEvent event;
- while(XCheckMaskEvent(display,~NoEventMask,&event)) {
+ XFlush( display );
+ while( XEventsQueued( display, QueuedAlready ) ) {
+ XNextEvent( display, &event );
+
switch(event.type) {
case ConfigureNotify:
xdisplay_configure_notify(event.xconfigure.width,
@@ -232,7 +242,12 @@
xkeyboard_keyrelease(&(event.xkey));
break;
case ClientMessage:
- if( event.xclient.data.l[0] == delete_window_atom ) fuse_exiting = 1;
+ if( event.xclient.format == 32 &&
+ event.xclient.data.l[0] == delete_window_atom ) {
+ fuse_emulation_pause();
+ menu_file_exit(0);
+ fuse_emulation_unpause();
+ }
break;
}
}
Index: ui/xlib/xdisplay.c
===================================================================
--- ui/xlib/xdisplay.c (revision 4651)
+++ ui/xlib/xdisplay.c (working copy)
@@ -997,6 +997,7 @@
XStringListToTextProperty( list, 1, &text);
XSetWMName( display, xui_mainWindow, &text );
+ XFree( text.value );
return 0;
}