Cleanup properly on x11drv unloading.
Moved --synchronous option into config file.
Removed --desktop, --display and --language command-line options.
diff --git a/windows/dce.c b/windows/dce.c
index 34b7451..3fd9b43 100644
--- a/windows/dce.c
+++ b/windows/dce.c
@@ -18,7 +18,6 @@
*/
#include <assert.h>
-#include "options.h"
#include "dce.h"
#include "win.h"
#include "gdi.h"
@@ -295,7 +294,7 @@
continue;
}
- if( !Options.desktopGeometry && wndCurrent == pDesktop )
+ if (wndCurrent == pDesktop && !(wndCurrent->flags & WIN_NATIVE))
{
/* don't bother with fake desktop */
WIN_ReleaseWndPtr(wndCurrent);
diff --git a/windows/win.c b/windows/win.c
index e96504b..fa1b319 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -622,7 +622,7 @@
pWndDesktop->pProp = NULL;
pWndDesktop->wIDmenu = 0;
pWndDesktop->helpContext = 0;
- pWndDesktop->flags = Options.desktopGeometry ? WIN_NATIVE : 0;
+ pWndDesktop->flags = 0;
pWndDesktop->hSysMenu = 0;
pWndDesktop->userdata = 0;
pWndDesktop->winproc = winproc;
diff --git a/windows/x11drv/event.c b/windows/x11drv/event.c
index 142eb84..1c08afb 100644
--- a/windows/x11drv/event.c
+++ b/windows/x11drv/event.c
@@ -148,6 +148,8 @@
static INPUT_TYPE current_input_type = X11DRV_INPUT_ABSOLUTE;
static BOOL in_transition = FALSE; /* This is not used as for today */
+static HANDLE service_object, service_timer;
+
/***********************************************************************
* EVENT_Init
*/
@@ -161,18 +163,24 @@
#endif
/* Install the X event processing callback */
- if (SERVICE_AddObject( FILE_DupUnixHandle( ConnectionNumber(display), GENERIC_READ|SYNCHRONIZE ),
- EVENT_ProcessAllEvents, 0 ) == INVALID_HANDLE_VALUE)
+ if ((service_object = SERVICE_AddObject( FILE_DupUnixHandle( ConnectionNumber(display), GENERIC_READ|SYNCHRONIZE ),
+ EVENT_ProcessAllEvents, 0 )) == INVALID_HANDLE_VALUE)
{
ERR("cannot add service object\n");
ExitProcess(1);
}
/* Install the XFlush timer callback */
- if ( Options.synchronous )
- TSXSynchronize( display, True );
- else
- SERVICE_AddTimer( 200, EVENT_Flush, 0 );
+ service_timer = SERVICE_AddTimer( 200, EVENT_Flush, 0 );
+}
+
+/***********************************************************************
+ * X11DRV_EVENT_Cleanup
+ */
+void X11DRV_EVENT_Cleanup(void)
+{
+ SERVICE_Delete( service_timer );
+ SERVICE_Delete( service_object );
}
/***********************************************************************
diff --git a/windows/x11drv/wnd.c b/windows/x11drv/wnd.c
index 524ac46..cc2c69c 100644
--- a/windows/x11drv/wnd.c
+++ b/windows/x11drv/wnd.c
@@ -190,6 +190,7 @@
_net_kde_system_tray_window_for = TSXInternAtom( display, "_NET_KDE_SYSTEM_TRAY_WINDOW_FOR", False );
((X11DRV_WND_DATA *) wndPtr->pDriverData)->window = X11DRV_GetXRootWindow();
+ if (X11DRV_GetXRootWindow() != DefaultRootWindow(display)) wndPtr->flags |= WIN_NATIVE;
X11DRV_WND_RegisterWindow( wndPtr );
return TRUE;