Alexandre Julliard : x11drv: Make the synchronous option a debug channel instead of a

Alexandre Julliard julliard at wine.codeweavers.com
Fri Feb 24 14:29:41 CST 2006


Module: wine
Branch: refs/heads/master
Commit: d61ad6cdd7cb6535b0c923df69e8ffc854cb67a5
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=d61ad6cdd7cb6535b0c923df69e8ffc854cb67a5

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Feb 24 21:05:44 2006 +0100

x11drv: Make the synchronous option a debug channel instead of a
registry entry to make it easier to use.

---

 dlls/x11drv/x11drv_main.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/dlls/x11drv/x11drv_main.c b/dlls/x11drv/x11drv_main.c
index 5c10690..55226d4 100644
--- a/dlls/x11drv/x11drv_main.c
+++ b/dlls/x11drv/x11drv_main.c
@@ -51,6 +51,7 @@
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
+WINE_DECLARE_DEBUG_CHANNEL(synchronous);
 
 static CRITICAL_SECTION X11DRV_CritSection;
 static CRITICAL_SECTION_DEBUG critsect_debug =
@@ -86,7 +87,6 @@ int copy_default_colors = 128;
 int alloc_system_colors = 256;
 DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES;
 
-static BOOL synchronous;  /* run in synchronous mode? */
 static BOOL desktop_dbl_buf = TRUE;
 static char *desktop_geometry;
 
@@ -224,7 +224,7 @@ static int error_handler( Display *displ
                error_evt->error_code, error_evt->request_code );
         return 0;
     }
-    if (synchronous)
+    if (TRACE_ON(synchronous))
     {
         ERR( "X protocol error: serial=%ld, request_code=%d - breaking into debugger\n",
              error_evt->serial, error_evt->request_code );
@@ -330,9 +330,6 @@ static void setup_options(void)
     if (!get_config_key( hkey, appkey, "ScreenDepth", buffer, sizeof(buffer) ))
         screen_depth = atoi(buffer);
 
-    if (!get_config_key( hkey, appkey, "Synchronous", buffer, sizeof(buffer) ))
-        synchronous = IS_OPTION_TRUE( buffer[0] );
-
     if (!get_config_key( hkey, appkey, "ClientSideWithCore", buffer, sizeof(buffer) ))
         client_side_with_core = IS_OPTION_TRUE( buffer[0] );
 
@@ -417,7 +414,7 @@ static BOOL process_attach(void)
 
     XInternAtoms( display, (char **)atom_names, NB_XATOMS - FIRST_XATOM, False, X11DRV_Atoms );
 
-    if (synchronous) XSynchronize( display, True );
+    if (TRACE_ON(synchronous)) XSynchronize( display, True );
 
     screen_width  = WidthOfScreen( screen );
     screen_height = HeightOfScreen( screen );
@@ -526,7 +523,7 @@ struct x11drv_thread_data *x11drv_init_t
     }
 #endif
 
-    if (synchronous) XSynchronize( data->display, True );
+    if (TRACE_ON(synchronous)) XSynchronize( data->display, True );
     wine_tsx11_unlock();
 
     if (use_xim && !(data->xim = X11DRV_SetupXIM( data->display, input_style )))




More information about the wine-cvs mailing list