You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against fcddf19498fca9b51baea705f5748b998f4560b9.
This commit is contained in:
@@ -1,16 +1,21 @@
|
||||
From 89800b44c37c6b76e1cdc817c3423638f4dd9ac8 Mon Sep 17 00:00:00 2001
|
||||
From: Rémi Bernon <rbernon@codeweavers.com>
|
||||
From 3d27835e97b472ed46ffbfd48bc1e16a30d1ff61 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Fri, 6 Jan 2023 08:09:11 +0100
|
||||
Subject: winex11: Write supported keyboard layout list in registry.
|
||||
Subject: [PATCH] winex11: Write supported keyboard layout list in registry.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30984
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605
|
||||
---
|
||||
dlls/winex11.drv/keyboard.c | 21 +++++++++++++++++++++
|
||||
dlls/winex11.drv/x11drv.h | 4 ++++
|
||||
dlls/winex11.drv/x11drv_main.c | 17 +++++++++++++++++
|
||||
3 files changed, 42 insertions(+)
|
||||
|
||||
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
|
||||
index 616728be621..ccdea98d1c2 100644
|
||||
index 5c7f6c37276..1846bd923a5 100644
|
||||
--- a/dlls/winex11.drv/keyboard.c
|
||||
+++ b/dlls/winex11.drv/keyboard.c
|
||||
@@ -1086,6 +1086,27 @@ static const WORD xfree86_vendor_key_vkey[256] =
|
||||
@@ -1084,6 +1084,27 @@ static const WORD xfree86_vendor_key_vkey[256] =
|
||||
0, 0, 0, 0, 0, 0, 0, 0 /* 1008FFF8 */
|
||||
};
|
||||
|
||||
@@ -39,22 +44,22 @@ index 616728be621..ccdea98d1c2 100644
|
||||
/* kbd_section must be held */
|
||||
static WORD EVENT_event_to_vkey( XIC xic, XKeyEvent *e)
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index c6328cf3fde..da8d9511a4c 100644
|
||||
index 2917579927c..da501ad4618 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -706,6 +706,10 @@ extern BOOL xinerama_get_fullscreen_monitors( const RECT *rect, long *indices )
|
||||
extern void xinerama_init( unsigned int width, unsigned int height ) DECLSPEC_HIDDEN;
|
||||
extern void init_recursive_mutex( pthread_mutex_t *mutex ) DECLSPEC_HIDDEN;
|
||||
@@ -701,6 +701,10 @@ extern BOOL xinerama_get_fullscreen_monitors( const RECT *rect, long *indices );
|
||||
extern void xinerama_init( unsigned int width, unsigned int height );
|
||||
extern void init_recursive_mutex( pthread_mutex_t *mutex );
|
||||
|
||||
+/* keyboard.c */
|
||||
+
|
||||
+extern WCHAR *x11drv_get_keyboard_layout_list( DWORD *size ) DECLSPEC_HIDDEN;
|
||||
+extern WCHAR *x11drv_get_keyboard_layout_list( DWORD *size );
|
||||
+
|
||||
#define DEPTH_COUNT 3
|
||||
extern const unsigned int *depths DECLSPEC_HIDDEN;
|
||||
extern const unsigned int *depths;
|
||||
|
||||
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
|
||||
index db957a80eb3..f3460141c33 100644
|
||||
index 70212a067b0..73b2237778b 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -446,6 +446,19 @@ static HKEY create_hkcu_key( const char *name )
|
||||
@@ -77,7 +82,7 @@ index db957a80eb3..f3460141c33 100644
|
||||
|
||||
ULONG query_reg_value( HKEY hkey, const WCHAR *name, KEY_VALUE_PARTIAL_INFORMATION *info, ULONG size )
|
||||
{
|
||||
@@ -564,6 +577,10 @@ static void setup_options(void)
|
||||
@@ -561,6 +574,10 @@ static void setup_options(void)
|
||||
if (!get_config_key( hkey, appkey, "GrabFullscreen", buffer, sizeof(buffer) ))
|
||||
grab_fullscreen = IS_OPTION_TRUE( buffer[0] );
|
||||
|
||||
@@ -88,3 +93,6 @@ index db957a80eb3..f3460141c33 100644
|
||||
if (!get_config_key( hkey, appkey, "ScreenDepth", buffer, sizeof(buffer) ))
|
||||
default_visual.depth = wcstol( buffer, NULL, 0 );
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 4ae28b915b829e0a0e1cd5afa9d91cb2c1f7a149 Mon Sep 17 00:00:00 2001
|
||||
From d277822336764e01d8edfef93332738dfbd678a3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Fri, 6 Jan 2023 08:09:11 +0100
|
||||
Subject: [PATCH] winex11: Use the user configured keyboard layout if any.
|
||||
@@ -12,10 +12,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605
|
||||
3 files changed, 33 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
|
||||
index a9f172db9df..087026f7d5f 100644
|
||||
index 1846bd923a5..fe87ae2235d 100644
|
||||
--- a/dlls/winex11.drv/keyboard.c
|
||||
+++ b/dlls/winex11.drv/keyboard.c
|
||||
@@ -931,7 +931,6 @@ static const struct {
|
||||
@@ -929,7 +929,6 @@ static const struct {
|
||||
|
||||
{0, NULL, NULL, NULL, NULL} /* sentinel */
|
||||
};
|
||||
@@ -23,7 +23,7 @@ index a9f172db9df..087026f7d5f 100644
|
||||
|
||||
/* maybe more of these scancodes should be extended? */
|
||||
/* extended must be set for ALT_R, CTRL_R,
|
||||
@@ -1086,6 +1085,26 @@ static const WORD xfree86_vendor_key_vkey[256] =
|
||||
@@ -1084,6 +1083,26 @@ static const WORD xfree86_vendor_key_vkey[256] =
|
||||
0, 0, 0, 0, 0, 0, 0, 0 /* 1008FFF8 */
|
||||
};
|
||||
|
||||
@@ -50,7 +50,7 @@ index a9f172db9df..087026f7d5f 100644
|
||||
WCHAR *x11drv_get_keyboard_layout_list( DWORD *length )
|
||||
{
|
||||
WCHAR *tmp, *layouts = calloc( 1, sizeof(WCHAR) );
|
||||
@@ -1432,11 +1451,11 @@ BOOL X11DRV_KeyEvent( HWND hwnd, XEvent *xev )
|
||||
@@ -1468,11 +1487,11 @@ BOOL X11DRV_KeyEvent( HWND hwnd, XEvent *xev )
|
||||
* whichever matches most closely.
|
||||
* kbd_section must be held.
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ index a9f172db9df..087026f7d5f 100644
|
||||
KeySym keysym = 0;
|
||||
const char (*lkey)[MAIN_LEN][4];
|
||||
unsigned max_seq = 0;
|
||||
@@ -1534,6 +1553,7 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
|
||||
@@ -1570,6 +1589,7 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
|
||||
main_key_tab[kbd_layout].comment);
|
||||
|
||||
TRACE("detected layout is \"%s\"\n", main_key_tab[kbd_layout].comment);
|
||||
@@ -72,7 +72,7 @@ index a9f172db9df..087026f7d5f 100644
|
||||
}
|
||||
|
||||
|
||||
@@ -1569,7 +1589,7 @@ void X11DRV_InitKeyboard( Display *display )
|
||||
@@ -1605,7 +1625,7 @@ void X11DRV_InitKeyboard( Display *display )
|
||||
{ 0x41, 0x5a }, /* VK_A - VK_Z */
|
||||
{ 0, 0 }
|
||||
};
|
||||
@@ -81,7 +81,7 @@ index a9f172db9df..087026f7d5f 100644
|
||||
|
||||
pthread_mutex_lock( &kbd_mutex );
|
||||
XDisplayKeycodes(display, &min_keycode, &max_keycode);
|
||||
@@ -1601,8 +1621,9 @@ void X11DRV_InitKeyboard( Display *display )
|
||||
@@ -1637,8 +1657,9 @@ void X11DRV_InitKeyboard( Display *display )
|
||||
}
|
||||
XFreeModifiermap(mmp);
|
||||
|
||||
@@ -94,27 +94,27 @@ index a9f172db9df..087026f7d5f 100644
|
||||
syms = (keysyms_per_keycode > 4) ? 4 : keysyms_per_keycode;
|
||||
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index 8798a49e506..80dbbee3727 100644
|
||||
index da501ad4618..9549d427583 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -456,6 +456,7 @@ extern BOOL use_primary_selection DECLSPEC_HIDDEN;
|
||||
extern BOOL use_system_cursors DECLSPEC_HIDDEN;
|
||||
extern BOOL show_systray DECLSPEC_HIDDEN;
|
||||
extern BOOL grab_fullscreen DECLSPEC_HIDDEN;
|
||||
+extern int keyboard_layout DECLSPEC_HIDDEN;
|
||||
extern BOOL usexcomposite DECLSPEC_HIDDEN;
|
||||
extern BOOL managed_mode DECLSPEC_HIDDEN;
|
||||
extern BOOL decorated_mode DECLSPEC_HIDDEN;
|
||||
@@ -716,6 +717,7 @@ extern void init_recursive_mutex( pthread_mutex_t *mutex ) DECLSPEC_HIDDEN;
|
||||
@@ -444,6 +444,7 @@ extern BOOL use_primary_selection;
|
||||
extern BOOL use_system_cursors;
|
||||
extern BOOL show_systray;
|
||||
extern BOOL grab_fullscreen;
|
||||
+extern int keyboard_layout;
|
||||
extern BOOL usexcomposite;
|
||||
extern BOOL managed_mode;
|
||||
extern BOOL decorated_mode;
|
||||
@@ -703,6 +704,7 @@ extern void init_recursive_mutex( pthread_mutex_t *mutex );
|
||||
|
||||
/* keyboard.c */
|
||||
|
||||
+extern int x11drv_find_keyboard_layout( const WCHAR *layout ) DECLSPEC_HIDDEN;
|
||||
extern WCHAR *x11drv_get_keyboard_layout_list( DWORD *size ) DECLSPEC_HIDDEN;
|
||||
+extern int x11drv_find_keyboard_layout( const WCHAR *layout );
|
||||
extern WCHAR *x11drv_get_keyboard_layout_list( DWORD *size );
|
||||
|
||||
#define DEPTH_COUNT 3
|
||||
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
|
||||
index e752302b236..05fe0ad8955 100644
|
||||
index 73b2237778b..3ac9b24d941 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -75,6 +75,7 @@ BOOL use_primary_selection = FALSE;
|
||||
@@ -125,7 +125,7 @@ index e752302b236..05fe0ad8955 100644
|
||||
BOOL managed_mode = TRUE;
|
||||
BOOL decorated_mode = TRUE;
|
||||
BOOL private_color_map = FALSE;
|
||||
@@ -575,6 +576,9 @@ static void setup_options(void)
|
||||
@@ -574,6 +575,9 @@ static void setup_options(void)
|
||||
if (!get_config_key( hkey, appkey, "GrabFullscreen", buffer, sizeof(buffer) ))
|
||||
grab_fullscreen = IS_OPTION_TRUE( buffer[0] );
|
||||
|
||||
@@ -136,5 +136,5 @@ index e752302b236..05fe0ad8955 100644
|
||||
if (p) set_reg_string_value( hkey, "KeyboardLayoutList", p, len * sizeof(WCHAR) );
|
||||
free( p );
|
||||
--
|
||||
2.40.1
|
||||
2.42.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From ec9488b146cde690e9015cd1ec442471176c2751 Mon Sep 17 00:00:00 2001
|
||||
From 8eed5c775bd6138ba5acb838a37ca7579697f65c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Wed, 30 Nov 2022 18:46:00 +0100
|
||||
Subject: [PATCH] winex11: Support fixed X11 keycode to scancode conversion.
|
||||
@@ -16,10 +16,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45605
|
||||
3 files changed, 47 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
|
||||
index 03d24edb44f..caccf34d947 100644
|
||||
index dbc1e1ea689..6a71da1a5d9 100644
|
||||
--- a/dlls/winex11.drv/keyboard.c
|
||||
+++ b/dlls/winex11.drv/keyboard.c
|
||||
@@ -66,6 +66,46 @@ static const unsigned int ControlMask = 1 << 2;
|
||||
@@ -64,6 +64,46 @@ static const unsigned int ControlMask = 1 << 2;
|
||||
static int min_keycode, max_keycode, keysyms_per_keycode;
|
||||
static WORD keyc2vkey[256], keyc2scan[256];
|
||||
|
||||
@@ -66,7 +66,7 @@ index 03d24edb44f..caccf34d947 100644
|
||||
static int NumLockMask, ScrollLockMask, AltGrMask; /* mask in the XKeyEvent state */
|
||||
|
||||
static pthread_mutex_t kbd_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
@@ -1701,7 +1741,7 @@ void X11DRV_InitKeyboard( Display *display )
|
||||
@@ -1737,7 +1777,7 @@ void X11DRV_InitKeyboard( Display *display )
|
||||
}
|
||||
TRACE("keycode %u => vkey %04X\n", e2.keycode, vkey);
|
||||
keyc2vkey[e2.keycode] = vkey;
|
||||
@@ -75,7 +75,7 @@ index 03d24edb44f..caccf34d947 100644
|
||||
if ((vkey & 0xff) && vkey_used[(vkey & 0xff)])
|
||||
WARN("vkey %04X is being used by more than one keycode\n", vkey);
|
||||
vkey_used[(vkey & 0xff)] = 1;
|
||||
@@ -1812,7 +1852,7 @@ void X11DRV_InitKeyboard( Display *display )
|
||||
@@ -1848,7 +1888,7 @@ void X11DRV_InitKeyboard( Display *display )
|
||||
#undef VKEY_IF_NOT_USED
|
||||
|
||||
/* If some keys still lack scancodes, assign some arbitrary ones to them now */
|
||||
@@ -85,19 +85,19 @@ index 03d24edb44f..caccf34d947 100644
|
||||
const char *ksname;
|
||||
keysym = XkbKeycodeToKeysym( display, keyc, 0, 0 );
|
||||
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
|
||||
index 80dbbee3727..260dd80de59 100644
|
||||
index 193e34037e3..367eb7b5f97 100644
|
||||
--- a/dlls/winex11.drv/x11drv.h
|
||||
+++ b/dlls/winex11.drv/x11drv.h
|
||||
@@ -457,6 +457,7 @@ extern BOOL use_system_cursors DECLSPEC_HIDDEN;
|
||||
extern BOOL show_systray DECLSPEC_HIDDEN;
|
||||
extern BOOL grab_fullscreen DECLSPEC_HIDDEN;
|
||||
extern int keyboard_layout DECLSPEC_HIDDEN;
|
||||
+extern BOOL keyboard_scancode_detect DECLSPEC_HIDDEN;
|
||||
extern BOOL usexcomposite DECLSPEC_HIDDEN;
|
||||
extern BOOL managed_mode DECLSPEC_HIDDEN;
|
||||
extern BOOL decorated_mode DECLSPEC_HIDDEN;
|
||||
@@ -445,6 +445,7 @@ extern BOOL use_system_cursors;
|
||||
extern BOOL show_systray;
|
||||
extern BOOL grab_fullscreen;
|
||||
extern int keyboard_layout;
|
||||
+extern BOOL keyboard_scancode_detect;
|
||||
extern BOOL usexcomposite;
|
||||
extern BOOL managed_mode;
|
||||
extern BOOL decorated_mode;
|
||||
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
|
||||
index 05fe0ad8955..802bbae7815 100644
|
||||
index 3ac9b24d941..60f624d4aec 100644
|
||||
--- a/dlls/winex11.drv/x11drv_main.c
|
||||
+++ b/dlls/winex11.drv/x11drv_main.c
|
||||
@@ -76,6 +76,7 @@ BOOL use_system_cursors = TRUE;
|
||||
@@ -108,7 +108,7 @@ index 05fe0ad8955..802bbae7815 100644
|
||||
BOOL managed_mode = TRUE;
|
||||
BOOL decorated_mode = TRUE;
|
||||
BOOL private_color_map = FALSE;
|
||||
@@ -583,6 +584,9 @@ static void setup_options(void)
|
||||
@@ -582,6 +583,9 @@ static void setup_options(void)
|
||||
if (p) set_reg_string_value( hkey, "KeyboardLayoutList", p, len * sizeof(WCHAR) );
|
||||
free( p );
|
||||
|
||||
@@ -119,5 +119,5 @@ index 05fe0ad8955..802bbae7815 100644
|
||||
default_visual.depth = wcstol( buffer, NULL, 0 );
|
||||
|
||||
--
|
||||
2.40.1
|
||||
2.42.0
|
||||
|
||||
|
Reference in New Issue
Block a user