=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: winex11.drv: Use BOOL type where appropriate.
Alexandre Julliard
julliard at winehq.org
Fri Nov 29 13:24:27 CST 2013
Module: wine
Branch: master
Commit: 323bec99b37ee5279956eac7dfb6c83fd3fcbd89
URL: http://source.winehq.org/git/wine.git/?a=commit;h=323bec99b37ee5279956eac7dfb6c83fd3fcbd89
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Fri Nov 29 12:33:09 2013 +0100
winex11.drv: Use BOOL type where appropriate.
---
dlls/winex11.drv/desktop.c | 2 +-
dlls/winex11.drv/event.c | 5 +++--
dlls/winex11.drv/mouse.c | 4 ++--
dlls/winex11.drv/window.c | 2 +-
dlls/winex11.drv/x11drv.h | 34 +++++++++++++++++-----------------
dlls/winex11.drv/x11drv_main.c | 40 ++++++++++++++++++++--------------------
dlls/winex11.drv/xvidmode.c | 6 +++---
7 files changed, 47 insertions(+), 46 deletions(-)
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c
index 7a1bb92..603e19f 100644
--- a/dlls/winex11.drv/desktop.c
+++ b/dlls/winex11.drv/desktop.c
@@ -117,7 +117,7 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height )
RECT primary_rect = get_primary_monitor_rect();
root_window = win;
- managed_mode = 0; /* no managed windows in desktop mode */
+ managed_mode = FALSE; /* no managed windows in desktop mode */
max_width = primary_rect.right - primary_rect.left;
max_height = primary_rect.bottom - primary_rect.top;
xinerama_init( width, height );
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index 767c003..f60e845 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -925,7 +925,7 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event )
if (event->xany.window == x11drv_thread_data()->clip_window)
{
- clipping_cursor = 1;
+ clipping_cursor = TRUE;
return;
}
if (!(data = get_win_data( hwnd ))) return;
@@ -945,7 +945,8 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event )
*/
static void X11DRV_UnmapNotify( HWND hwnd, XEvent *event )
{
- if (event->xany.window == x11drv_thread_data()->clip_window) clipping_cursor = 0;
+ if (event->xany.window == x11drv_thread_data()->clip_window)
+ clipping_cursor = FALSE;
}
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 2300f30..f1e58fe 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -400,7 +400,7 @@ static BOOL grab_clipping_window( const RECT *clip )
if (!XGrabPointer( data->display, clip_window, False,
PointerMotionMask | ButtonPressMask | ButtonReleaseMask,
GrabModeAsync, GrabModeAsync, clip_window, None, CurrentTime ))
- clipping_cursor = 1;
+ clipping_cursor = TRUE;
if (!clipping_cursor)
{
@@ -430,7 +430,7 @@ void ungrab_clipping_window(void)
TRACE( "no longer clipping\n" );
XUnmapWindow( display, clip_window );
- clipping_cursor = 0;
+ clipping_cursor = FALSE;
SendMessageW( GetDesktopWindow(), WM_X11DRV_CLIP_CURSOR, 0, 0 );
}
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index e78f226..4da361a 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -68,7 +68,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
#define SWP_AGG_NOPOSCHANGE (SWP_NOSIZE | SWP_NOMOVE | SWP_NOCLIENTSIZE | SWP_NOCLIENTMOVE | SWP_NOZORDER)
/* is cursor clipping active? */
-int clipping_cursor = 0;
+BOOL clipping_cursor = FALSE;
/* X context to associate a hwnd to an X window */
XContext winContext = 0;
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 98386ce..9008db6 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -216,9 +216,9 @@ extern INT X11DRV_YWStoDS( HDC hdc, INT height ) DECLSPEC_HIDDEN;
extern const int X11DRV_XROPfunction[];
-extern int client_side_graphics DECLSPEC_HIDDEN;
-extern int client_side_with_render DECLSPEC_HIDDEN;
-extern int shape_layered_windows DECLSPEC_HIDDEN;
+extern BOOL client_side_graphics DECLSPEC_HIDDEN;
+extern BOOL client_side_with_render DECLSPEC_HIDDEN;
+extern BOOL shape_layered_windows DECLSPEC_HIDDEN;
extern const struct gdi_dc_funcs *X11DRV_XRender_Init(void) DECLSPEC_HIDDEN;
extern struct opengl_funcs *get_glx_driver(UINT) DECLSPEC_HIDDEN;
@@ -363,22 +363,22 @@ extern XVisualInfo argb_visual DECLSPEC_HIDDEN;
extern Colormap default_colormap DECLSPEC_HIDDEN;
extern XPixmapFormatValues **pixmap_formats DECLSPEC_HIDDEN;
extern Window root_window DECLSPEC_HIDDEN;
-extern int clipping_cursor DECLSPEC_HIDDEN;
+extern BOOL clipping_cursor DECLSPEC_HIDDEN;
extern unsigned int screen_bpp DECLSPEC_HIDDEN;
-extern int use_xkb DECLSPEC_HIDDEN;
-extern int usexrandr DECLSPEC_HIDDEN;
-extern int usexvidmode DECLSPEC_HIDDEN;
+extern BOOL use_xkb DECLSPEC_HIDDEN;
+extern BOOL usexrandr DECLSPEC_HIDDEN;
+extern BOOL usexvidmode DECLSPEC_HIDDEN;
extern BOOL ximInComposeMode DECLSPEC_HIDDEN;
-extern int use_take_focus DECLSPEC_HIDDEN;
-extern int use_primary_selection DECLSPEC_HIDDEN;
-extern int use_system_cursors DECLSPEC_HIDDEN;
-extern int show_systray DECLSPEC_HIDDEN;
-extern int grab_pointer DECLSPEC_HIDDEN;
-extern int grab_fullscreen DECLSPEC_HIDDEN;
-extern int usexcomposite DECLSPEC_HIDDEN;
-extern int managed_mode DECLSPEC_HIDDEN;
-extern int decorated_mode DECLSPEC_HIDDEN;
-extern int private_color_map DECLSPEC_HIDDEN;
+extern BOOL use_take_focus DECLSPEC_HIDDEN;
+extern BOOL use_primary_selection DECLSPEC_HIDDEN;
+extern BOOL use_system_cursors DECLSPEC_HIDDEN;
+extern BOOL show_systray DECLSPEC_HIDDEN;
+extern BOOL grab_pointer DECLSPEC_HIDDEN;
+extern BOOL grab_fullscreen DECLSPEC_HIDDEN;
+extern BOOL usexcomposite DECLSPEC_HIDDEN;
+extern BOOL managed_mode DECLSPEC_HIDDEN;
+extern BOOL decorated_mode DECLSPEC_HIDDEN;
+extern BOOL private_color_map DECLSPEC_HIDDEN;
extern int primary_monitor DECLSPEC_HIDDEN;
extern int copy_default_colors DECLSPEC_HIDDEN;
extern int alloc_system_colors DECLSPEC_HIDDEN;
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index a6572ba..85c69bf 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -62,23 +62,23 @@ Colormap default_colormap = None;
XPixmapFormatValues **pixmap_formats;
unsigned int screen_bpp;
Window root_window;
-int usexvidmode = 1;
-int usexrandr = 1;
-int usexcomposite = 1;
-int use_xkb = 1;
-int use_take_focus = 1;
-int use_primary_selection = 0;
-int use_system_cursors = 1;
-int show_systray = 1;
-int grab_pointer = 1;
-int grab_fullscreen = 0;
-int managed_mode = 1;
-int decorated_mode = 1;
-int private_color_map = 0;
+BOOL usexvidmode = TRUE;
+BOOL usexrandr = TRUE;
+BOOL usexcomposite = TRUE;
+BOOL use_xkb = TRUE;
+BOOL use_take_focus = TRUE;
+BOOL use_primary_selection = FALSE;
+BOOL use_system_cursors = TRUE;
+BOOL show_systray = TRUE;
+BOOL grab_pointer = TRUE;
+BOOL grab_fullscreen = FALSE;
+BOOL managed_mode = TRUE;
+BOOL decorated_mode = TRUE;
+BOOL private_color_map = FALSE;
int primary_monitor = 0;
-int client_side_graphics = 1;
-int client_side_with_render = 1;
-int shape_layered_windows = 1;
+BOOL client_side_graphics = TRUE;
+BOOL client_side_with_render = TRUE;
+BOOL shape_layered_windows = TRUE;
int copy_default_colors = 128;
int alloc_system_colors = 256;
DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES;
@@ -91,7 +91,7 @@ static void *err_callback_arg; /* error callback argument */
static int err_callback_result; /* error callback result */
static unsigned long err_serial; /* serial number of first request */
static int (*old_error_handler)( Display *, XErrorEvent * );
-static int use_xim = 1;
+static BOOL use_xim = TRUE;
static char input_style[20];
#define IS_OPTION_TRUE(ch) \
@@ -439,7 +439,7 @@ static void X11DRV_XComposite_Init(void)
if (!xcomposite_handle)
{
TRACE("Unable to open %s, XComposite disabled\n", SONAME_LIBXCOMPOSITE);
- usexcomposite = 0;
+ usexcomposite = FALSE;
return;
}
@@ -462,7 +462,7 @@ static void X11DRV_XComposite_Init(void)
TRACE("XComposite extension could not be queried; disabled\n");
wine_dlclose(xcomposite_handle, NULL, 0);
xcomposite_handle = NULL;
- usexcomposite = 0;
+ usexcomposite = FALSE;
return;
}
TRACE("XComposite is up and running error_base = %d\n", xcomp_error_base);
@@ -472,7 +472,7 @@ sym_not_found:
TRACE("Unable to load function pointers from %s, XComposite disabled\n", SONAME_LIBXCOMPOSITE);
wine_dlclose(xcomposite_handle, NULL, 0);
xcomposite_handle = NULL;
- usexcomposite = 0;
+ usexcomposite = FALSE;
}
#endif /* defined(SONAME_LIBXCOMPOSITE) */
diff --git a/dlls/winex11.drv/xvidmode.c b/dlls/winex11.drv/xvidmode.c
index a4e20f3..0020b08 100644
--- a/dlls/winex11.drv/xvidmode.c
+++ b/dlls/winex11.drv/xvidmode.c
@@ -43,7 +43,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(xvidmode);
#ifdef SONAME_LIBXXF86VM
-extern int usexvidmode;
+extern BOOL usexvidmode;
static int xf86vm_event, xf86vm_error, xf86vm_major, xf86vm_minor;
@@ -163,7 +163,7 @@ void X11DRV_XF86VM_Init(void)
if (!xvidmode_handle)
{
TRACE("Unable to open %s, XVidMode disabled\n", SONAME_LIBXXF86VM);
- usexvidmode = 0;
+ usexvidmode = FALSE;
return;
}
@@ -242,7 +242,7 @@ sym_not_found:
TRACE("Unable to load function pointers from %s, XVidMode disabled\n", SONAME_LIBXXF86VM);
wine_dlclose(xvidmode_handle, NULL, 0);
xvidmode_handle = NULL;
- usexvidmode = 0;
+ usexvidmode = FALSE;
}
/***** GAMMA CONTROL *****/
More information about the wine-cvs
mailing list