Commit 7d614be4 authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Use int instead of long types in a few places.

parent 1a5bfe13
...@@ -163,7 +163,7 @@ void init_registry_display_settings(void) ...@@ -163,7 +163,7 @@ void init_registry_display_settings(void)
DISPLAY_DEVICEW dd = {sizeof(dd)}; DISPLAY_DEVICEW dd = {sizeof(dd)};
UNICODE_STRING device_name; UNICODE_STRING device_name;
DWORD i = 0; DWORD i = 0;
LONG ret; int ret;
while (!NtUserEnumDisplayDevices( NULL, i++, &dd, 0 )) while (!NtUserEnumDisplayDevices( NULL, i++, &dd, 0 ))
{ {
......
...@@ -1268,7 +1268,7 @@ static int get_window_wm_state( Display *display, Window window ) ...@@ -1268,7 +1268,7 @@ static int get_window_wm_state( Display *display, Window window )
static void handle_wm_state_notify( HWND hwnd, XPropertyEvent *event, BOOL update_window ) static void handle_wm_state_notify( HWND hwnd, XPropertyEvent *event, BOOL update_window )
{ {
struct x11drv_win_data *data = get_win_data( hwnd ); struct x11drv_win_data *data = get_win_data( hwnd );
DWORD style; UINT style;
if (!data) return; if (!data) return;
...@@ -1781,7 +1781,7 @@ static DWORD xdnd_action_to_drop_effect( long action ) ...@@ -1781,7 +1781,7 @@ static DWORD xdnd_action_to_drop_effect( long action )
} }
static long drop_effect_to_xdnd_action( DWORD effect ) static long drop_effect_to_xdnd_action( UINT effect )
{ {
if (effect == DROPEFFECT_COPY) if (effect == DROPEFFECT_COPY)
return x11drv_atom(XdndActionCopy); return x11drv_atom(XdndActionCopy);
...@@ -1801,7 +1801,7 @@ static void handle_xdnd_position_event( HWND hwnd, XClientMessageEvent *event ) ...@@ -1801,7 +1801,7 @@ static void handle_xdnd_position_event( HWND hwnd, XClientMessageEvent *event )
{ {
struct dnd_position_event_params params; struct dnd_position_event_params params;
XClientMessageEvent e; XClientMessageEvent e;
DWORD effect; UINT effect;
params.hwnd = HandleToUlong( hwnd ); params.hwnd = HandleToUlong( hwnd );
params.point = root_to_virtual_screen( event->data.l[2] >> 16, event->data.l[2] & 0xFFFF ); params.point = root_to_virtual_screen( event->data.l[2] >> 16, event->data.l[2] & 0xFFFF );
......
...@@ -1704,7 +1704,7 @@ BOOL CDECL X11DRV_GetICMProfile( PHYSDEV dev, BOOL allow_default, LPDWORD size, ...@@ -1704,7 +1704,7 @@ BOOL CDECL X11DRV_GetICMProfile( PHYSDEV dev, BOOL allow_default, LPDWORD size,
IO_STATUS_BLOCK io; IO_STATUS_BLOCK io;
UINT64 hash = 0; UINT64 hash = 0;
HANDLE file; HANDLE file;
NTSTATUS status; int status;
for (i = 0; i < buflen; i++) hash = (hash << 16) - hash + buffer[i]; for (i = 0; i < buflen; i++) hash = (hash << 16) - hash + buffer[i];
for (i = 0; i < sizeof(hash) * 2; i++) for (i = 0; i < sizeof(hash) * 2; i++)
......
...@@ -1132,7 +1132,7 @@ static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e) ...@@ -1132,7 +1132,7 @@ static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e)
/*********************************************************************** /***********************************************************************
* X11DRV_send_keyboard_input * X11DRV_send_keyboard_input
*/ */
static void X11DRV_send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, DWORD flags, DWORD time ) static void X11DRV_send_keyboard_input( HWND hwnd, WORD vkey, WORD scan, UINT flags, UINT time )
{ {
INPUT input; INPUT input;
...@@ -1275,7 +1275,7 @@ static void adjust_lock_state( BYTE *keystate, HWND hwnd, WORD vkey, WORD scan, ...@@ -1275,7 +1275,7 @@ static void adjust_lock_state( BYTE *keystate, HWND hwnd, WORD vkey, WORD scan,
} }
} }
static void update_lock_state( HWND hwnd, WORD vkey, UINT state, DWORD time ) static void update_lock_state( HWND hwnd, WORD vkey, UINT state, UINT time )
{ {
BYTE keystate[256]; BYTE keystate[256];
......
...@@ -51,7 +51,7 @@ static DWORD get_user_dashes( char *res, const DWORD *style, DWORD len ) ...@@ -51,7 +51,7 @@ static DWORD get_user_dashes( char *res, const DWORD *style, DWORD len )
} }
else dashes[pos++] = dashes[i]; else dashes[pos++] = dashes[i];
} }
for (i = 0; i < pos; i++) res[i] = min( dashes[i], 255 ); for (i = 0; i < pos; i++) res[i] = (char)min( dashes[i], 255 );
return pos; return pos;
} }
...@@ -147,7 +147,7 @@ HPEN CDECL X11DRV_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern ...@@ -147,7 +147,7 @@ HPEN CDECL X11DRV_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern
(logpen.lopnStyle & PS_STYLE_MASK) != PS_USERSTYLE && (logpen.lopnStyle & PS_STYLE_MASK) != PS_USERSTYLE &&
(logpen.lopnStyle & PS_STYLE_MASK) != PS_ALTERNATE) (logpen.lopnStyle & PS_STYLE_MASK) != PS_ALTERNATE)
for(i = 0; i < physDev->pen.dash_len; i++) for(i = 0; i < physDev->pen.dash_len; i++)
physDev->pen.dashes[i] = min( physDev->pen.dashes[i] * physDev->pen.width, 255 ); physDev->pen.dashes[i] = (char)min( physDev->pen.dashes[i] * physDev->pen.width, 255 );
free( elp ); free( elp );
......
...@@ -737,7 +737,7 @@ static void set_size_hints( struct x11drv_win_data *data, DWORD style ) ...@@ -737,7 +737,7 @@ static void set_size_hints( struct x11drv_win_data *data, DWORD style )
/*********************************************************************** /***********************************************************************
* set_mwm_hints * set_mwm_hints
*/ */
static void set_mwm_hints( struct x11drv_win_data *data, DWORD style, DWORD ex_style ) static void set_mwm_hints( struct x11drv_win_data *data, UINT style, UINT ex_style )
{ {
MwmHints mwm_hints; MwmHints mwm_hints;
...@@ -1015,7 +1015,7 @@ static void update_net_wm_fullscreen_monitors( struct x11drv_win_data *data ) ...@@ -1015,7 +1015,7 @@ static void update_net_wm_fullscreen_monitors( struct x11drv_win_data *data )
*/ */
void update_net_wm_states( struct x11drv_win_data *data ) void update_net_wm_states( struct x11drv_win_data *data )
{ {
DWORD i, style, ex_style, new_state = 0; UINT i, style, ex_style, new_state = 0;
if (!data->managed) return; if (!data->managed) return;
if (data->whole_window == root_window) return; if (data->whole_window == root_window) return;
...@@ -2053,7 +2053,7 @@ HWND create_foreign_window( Display *display, Window xwin ) ...@@ -2053,7 +2053,7 @@ HWND create_foreign_window( Display *display, Window xwin )
Window *xchildren; Window *xchildren;
unsigned int nchildren; unsigned int nchildren;
XWindowAttributes attr; XWindowAttributes attr;
DWORD style = WS_CLIPCHILDREN; UINT style = WS_CLIPCHILDREN;
UNICODE_STRING class_name; UNICODE_STRING class_name;
if (!class_registered) if (!class_registered)
...@@ -2592,7 +2592,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags, ...@@ -2592,7 +2592,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
{ {
struct x11drv_thread_data *thread_data; struct x11drv_thread_data *thread_data;
struct x11drv_win_data *data; struct x11drv_win_data *data;
DWORD new_style = NtUserGetWindowLongW( hwnd, GWL_STYLE ); UINT new_style = NtUserGetWindowLongW( hwnd, GWL_STYLE );
RECT old_window_rect, old_whole_rect, old_client_rect; RECT old_window_rect, old_whole_rect, old_client_rect;
int event_type; int event_type;
......
...@@ -823,7 +823,7 @@ extern struct x11drv_display_device_handler desktop_handler DECLSPEC_HIDDEN; ...@@ -823,7 +823,7 @@ extern struct x11drv_display_device_handler desktop_handler DECLSPEC_HIDDEN;
extern BOOL X11DRV_InitXIM( const WCHAR *input_style ) DECLSPEC_HIDDEN; extern BOOL X11DRV_InitXIM( const WCHAR *input_style ) DECLSPEC_HIDDEN;
extern XIC X11DRV_CreateIC(XIM xim, struct x11drv_win_data *data) DECLSPEC_HIDDEN; extern XIC X11DRV_CreateIC(XIM xim, struct x11drv_win_data *data) DECLSPEC_HIDDEN;
extern void X11DRV_SetupXIM(void) DECLSPEC_HIDDEN; extern void X11DRV_SetupXIM(void) DECLSPEC_HIDDEN;
extern void X11DRV_XIMLookupChars( const char *str, DWORD count ) DECLSPEC_HIDDEN; extern void X11DRV_XIMLookupChars( const char *str, UINT count ) DECLSPEC_HIDDEN;
#define XEMBED_MAPPED (1 << 0) #define XEMBED_MAPPED (1 << 0)
......
...@@ -61,17 +61,16 @@ static XIMStyle ximStyle = 0; ...@@ -61,17 +61,16 @@ static XIMStyle ximStyle = 0;
static XIMStyle ximStyleRoot = 0; static XIMStyle ximStyleRoot = 0;
static XIMStyle ximStyleRequest = STYLE_CALLBACK; static XIMStyle ximStyleRequest = STYLE_CALLBACK;
static void X11DRV_ImmSetInternalString(DWORD dwOffset, static void X11DRV_ImmSetInternalString(UINT offset, UINT selLength, LPWSTR lpComp, UINT len)
DWORD selLength, LPWSTR lpComp, DWORD dwCompLen)
{ {
/* Composition strings are edited in chunks */ /* Composition strings are edited in chunks */
unsigned int byte_length = dwCompLen * sizeof(WCHAR); unsigned int byte_length = len * sizeof(WCHAR);
unsigned int byte_offset = dwOffset * sizeof(WCHAR); unsigned int byte_offset = offset * sizeof(WCHAR);
unsigned int byte_selection = selLength * sizeof(WCHAR); unsigned int byte_selection = selLength * sizeof(WCHAR);
int byte_expansion = byte_length - byte_selection; int byte_expansion = byte_length - byte_selection;
LPBYTE ptr_new; LPBYTE ptr_new;
TRACE("( %i, %i, %p, %d):\n", dwOffset, selLength, lpComp, dwCompLen ); TRACE("( %i, %i, %p, %d):\n", offset, selLength, lpComp, len );
if (byte_expansion + dwCompStringLength >= dwCompStringSize) if (byte_expansion + dwCompStringLength >= dwCompStringSize)
{ {
...@@ -96,7 +95,7 @@ static void X11DRV_ImmSetInternalString(DWORD dwOffset, ...@@ -96,7 +95,7 @@ static void X11DRV_ImmSetInternalString(DWORD dwOffset,
CompositionString, dwCompStringLength ); CompositionString, dwCompStringLength );
} }
void X11DRV_XIMLookupChars( const char *str, DWORD count ) void X11DRV_XIMLookupChars( const char *str, UINT count )
{ {
WCHAR *output; WCHAR *output;
DWORD len; DWORD len;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment