Commit 6dd08c34 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winex11: Use wcsicmp for string comparison.

parent 497f37cf
...@@ -90,7 +90,7 @@ static BOOL X11DRV_desktop_get_id( const WCHAR *device_name, ULONG_PTR *id ) ...@@ -90,7 +90,7 @@ static BOOL X11DRV_desktop_get_id( const WCHAR *device_name, ULONG_PTR *id )
{ {
WCHAR primary_adapter[CCHDEVICENAME]; WCHAR primary_adapter[CCHDEVICENAME];
if (!get_primary_adapter( primary_adapter ) || lstrcmpiW( primary_adapter, device_name )) if (!get_primary_adapter( primary_adapter ) || wcsicmp( primary_adapter, device_name ))
return FALSE; return FALSE;
*id = 0; *id = 0;
...@@ -342,7 +342,7 @@ NTSTATUS x11drv_create_desktop( void *arg ) ...@@ -342,7 +342,7 @@ NTSTATUS x11drv_create_desktop( void *arg )
TRACE( "%s %ux%u\n", debugstr_w(name), params->width, params->height ); TRACE( "%s %ux%u\n", debugstr_w(name), params->width, params->height );
/* magic: desktop "root" means use the root window */ /* magic: desktop "root" means use the root window */
if (!lstrcmpiW( name, rootW )) return FALSE; if (!wcsicmp( name, rootW )) return FALSE;
/* Create window */ /* Create window */
win_attr.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | EnterWindowMask | win_attr.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | EnterWindowMask |
......
...@@ -2203,7 +2203,7 @@ INT X11DRV_GetKeyNameText( LONG lParam, LPWSTR lpBuffer, INT nSize ) ...@@ -2203,7 +2203,7 @@ INT X11DRV_GetKeyNameText( LONG lParam, LPWSTR lpBuffer, INT nSize )
if (name && (vkey == VK_SHIFT || vkey == VK_CONTROL || vkey == VK_MENU)) if (name && (vkey == VK_SHIFT || vkey == VK_CONTROL || vkey == VK_MENU))
{ {
char* idx = strrchr(name, '_'); char* idx = strrchr(name, '_');
if (idx && (_strnicmp(idx, "_r", -1) == 0 || _strnicmp(idx, "_l", -1) == 0)) if (idx && (idx[1] == 'r' || idx[1] == 'R' || idx[1] == 'l' || idx[1] == 'L') && !idx[2])
{ {
pthread_mutex_unlock( &kbd_mutex ); pthread_mutex_unlock( &kbd_mutex );
TRACE("found scan=%04x keyc=%u keysym=%lx modified_string=%s\n", TRACE("found scan=%04x keyc=%u keysym=%lx modified_string=%s\n",
......
...@@ -91,7 +91,7 @@ static BOOL nores_get_id(const WCHAR *device_name, ULONG_PTR *id) ...@@ -91,7 +91,7 @@ static BOOL nores_get_id(const WCHAR *device_name, ULONG_PTR *id)
if (!get_primary_adapter( primary_adapter )) if (!get_primary_adapter( primary_adapter ))
return FALSE; return FALSE;
*id = !lstrcmpiW( device_name, primary_adapter ) ? 1 : 0; *id = !wcsicmp( device_name, primary_adapter ) ? 1 : 0;
return TRUE; return TRUE;
} }
...@@ -500,7 +500,7 @@ BOOL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DW ...@@ -500,7 +500,7 @@ BOOL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DW
} }
pthread_mutex_lock( &settings_mutex ); pthread_mutex_lock( &settings_mutex );
if (n == 0 || lstrcmpiW(cached_device_name, name) || cached_flags != flags) if (n == 0 || wcsicmp(cached_device_name, name) || cached_flags != flags)
{ {
if (!handler.get_id(name, &id) || !handler.get_modes(id, flags, &modes, &mode_count)) if (!handler.get_id(name, &id) || !handler.get_modes(id, flags, &modes, &mode_count))
{ {
...@@ -654,7 +654,7 @@ static LONG get_display_settings(struct x11drv_display_setting **new_displays, ...@@ -654,7 +654,7 @@ static LONG get_display_settings(struct x11drv_display_setting **new_displays,
displays[display_idx].desired_mode = registry_mode; displays[display_idx].desired_mode = registry_mode;
} }
else if (!lstrcmpiW(dev_name, display_device.DeviceName)) else if (!wcsicmp(dev_name, display_device.DeviceName))
{ {
displays[display_idx].desired_mode = *dev_mode; displays[display_idx].desired_mode = *dev_mode;
if (!(dev_mode->dmFields & DM_POSITION)) if (!(dev_mode->dmFields & DM_POSITION))
...@@ -950,7 +950,7 @@ LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, ...@@ -950,7 +950,7 @@ LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
{ {
for (display_idx = 0; display_idx < display_count; ++display_idx) for (display_idx = 0; display_idx < display_count; ++display_idx)
{ {
if (!lstrcmpiW(displays[display_idx].desired_mode.dmDeviceName, devname)) if (!wcsicmp(displays[display_idx].desired_mode.dmDeviceName, devname))
{ {
full_mode = get_full_mode(displays[display_idx].id, &displays[display_idx].desired_mode); full_mode = get_full_mode(displays[display_idx].id, &displays[display_idx].desired_mode);
if (!full_mode) if (!full_mode)
......
...@@ -949,4 +949,6 @@ static inline int ntdll_wcstoumbs( const WCHAR *src, DWORD srclen, char *dst, DW ...@@ -949,4 +949,6 @@ static inline int ntdll_wcstoumbs( const WCHAR *src, DWORD srclen, char *dst, DW
return WideCharToMultiByte( CP_UNIXCP, 0, src, srclen, dst, dstlen, NULL, NULL ); return WideCharToMultiByte( CP_UNIXCP, 0, src, srclen, dst, dstlen, NULL, NULL );
} }
#define wcsicmp lstrcmpiW
#endif /* __WINE_X11DRV_H */ #endif /* __WINE_X11DRV_H */
...@@ -151,7 +151,7 @@ static BOOL xrandr10_get_id( const WCHAR *device_name, ULONG_PTR *id ) ...@@ -151,7 +151,7 @@ static BOOL xrandr10_get_id( const WCHAR *device_name, ULONG_PTR *id )
/* RandR 1.0 only supports changing the primary adapter settings. /* RandR 1.0 only supports changing the primary adapter settings.
* For non-primary adapters, an id is still provided but getting * For non-primary adapters, an id is still provided but getting
* and changing non-primary adapters' settings will be ignored. */ * and changing non-primary adapters' settings will be ignored. */
*id = !lstrcmpiW( device_name, primary_adapter ) ? 1 : 0; *id = !wcsicmp( device_name, primary_adapter ) ? 1 : 0;
return TRUE; return TRUE;
} }
......
...@@ -91,7 +91,7 @@ static BOOL xf86vm_get_id(const WCHAR *device_name, ULONG_PTR *id) ...@@ -91,7 +91,7 @@ static BOOL xf86vm_get_id(const WCHAR *device_name, ULONG_PTR *id)
/* XVidMode only supports changing the primary adapter settings. /* XVidMode only supports changing the primary adapter settings.
* For non-primary adapters, an id is still provided but getting * For non-primary adapters, an id is still provided but getting
* and changing non-primary adapters' settings will be ignored. */ * and changing non-primary adapters' settings will be ignored. */
*id = !lstrcmpiW( device_name, primary_adapter ) ? 1 : 0; *id = !wcsicmp( device_name, primary_adapter ) ? 1 : 0;
return TRUE; return TRUE;
} }
......
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