Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Joan Roque-Worcel
wine
Commits
8d361bd4
Commit
8d361bd4
authored
22 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Properly initialize keyboard auto-repeat for all X connections.
parent
4fd679b0
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/x11drv/keyboard.c
+2
-17
2 additions, 17 deletions
dlls/x11drv/keyboard.c
dlls/x11drv/x11drv_main.c
+22
-0
22 additions, 0 deletions
dlls/x11drv/x11drv_main.c
include/x11drv.h
+1
-0
1 addition, 0 deletions
include/x11drv.h
with
25 additions
and
17 deletions
dlls/x11drv/keyboard.c
+
2
−
17
View file @
8d361bd4
...
...
@@ -58,9 +58,6 @@ WORD keyc2vkey[256], keyc2scan[256];
static
LPBYTE
pKeyStateTable
;
static
int
NumLockMask
,
AltGrMask
;
/* mask in the XKeyEvent state */
static
int
kcControl
,
kcAlt
,
kcShift
,
kcNumLock
,
kcCapsLock
;
/* keycodes */
#ifdef HAVE_XKB
static
int
is_xkb
,
xkb_opcode
,
xkb_event
,
xkb_error
;
#endif
static
char
KEYBOARD_MapDeadKeysym
(
KeySym
keysym
);
...
...
@@ -1124,7 +1121,7 @@ X11DRV_KEYBOARD_DetectLayout (void)
if
((
keysym
<
0x8000
)
&&
(
keysym
!=
' '
))
{
#ifdef HAVE_XKB
if
(
!
is
_xkb
||
!
XkbTranslateKeySym
(
display
,
&
keysym
,
0
,
&
ckey
[
i
],
1
,
NULL
))
if
(
!
use
_xkb
||
!
XkbTranslateKeySym
(
display
,
&
keysym
,
0
,
&
ckey
[
i
],
1
,
NULL
))
#endif
{
TRACE
(
"XKB could not translate keysym %ld
\n
"
,
keysym
);
...
...
@@ -1200,9 +1197,6 @@ X11DRV_KEYBOARD_DetectLayout (void)
*/
void
X11DRV_InitKeyboard
(
BYTE
*
key_state_table
)
{
#ifdef HAVE_XKB
int
xkb_major
=
XkbMajorVersion
,
xkb_minor
=
XkbMinorVersion
;
#endif
Display
*
display
=
thread_display
();
KeySym
*
ksp
;
XModifierKeymap
*
mmp
;
...
...
@@ -1217,15 +1211,6 @@ void X11DRV_InitKeyboard( BYTE *key_state_table )
pKeyStateTable
=
key_state_table
;
wine_tsx11_lock
();
#ifdef HAVE_XKB
is_xkb
=
XkbQueryExtension
(
display
,
&
xkb_opcode
,
&
xkb_event
,
&
xkb_error
,
&
xkb_major
,
&
xkb_minor
);
if
(
is_xkb
)
{
/* we have XKB, approximate Windows behaviour */
XkbSetDetectableAutoRepeat
(
display
,
True
,
NULL
);
}
#endif
XDisplayKeycodes
(
display
,
&
min_keycode
,
&
max_keycode
);
ksp
=
XGetKeyboardMapping
(
display
,
min_keycode
,
max_keycode
+
1
-
min_keycode
,
&
keysyms_per_keycode
);
...
...
@@ -1291,7 +1276,7 @@ void X11DRV_InitKeyboard( BYTE *key_state_table )
if
((
keysym
<
0x8000
)
&&
(
keysym
!=
' '
))
{
#ifdef HAVE_XKB
if
(
!
is
_xkb
||
!
XkbTranslateKeySym
(
display
,
&
keysym
,
0
,
&
ckey
[
i
],
1
,
NULL
))
if
(
!
use
_xkb
||
!
XkbTranslateKeySym
(
display
,
&
keysym
,
0
,
&
ckey
[
i
],
1
,
NULL
))
#endif
{
/* FIXME: query what keysym is used as Mode_switch, fill XKeyEvent
...
...
This diff is collapsed.
Click to expand it.
dlls/x11drv/x11drv_main.c
+
22
−
0
View file @
8d361bd4
...
...
@@ -33,6 +33,9 @@
#endif
#include
<X11/cursorfont.h>
#include
"ts_xlib.h"
#ifdef HAVE_XKB
#include
<X11/XKBlib.h>
#endif
#include
"winbase.h"
#include
"wine/winbase16.h"
...
...
@@ -59,6 +62,7 @@ unsigned int screen_depth;
Window
root_window
;
DWORD
desktop_tid
=
0
;
int
dxgrab
,
usedga
,
usexvidmode
;
int
use_xkb
=
1
;
int
use_take_focus
=
1
;
int
managed_mode
=
1
;
int
client_side_with_core
=
1
;
...
...
@@ -318,6 +322,20 @@ static void process_attach(void)
}
else
screen_depth
=
DefaultDepthOfScreen
(
screen
);
/* check for Xkb extension */
#ifdef HAVE_XKB
if
(
use_xkb
)
{
int
xkb_opcode
,
xkb_event
,
xkb_error
;
int
xkb_major
=
XkbMajorVersion
,
xkb_minor
=
XkbMinorVersion
;
use_xkb
=
XkbQueryExtension
(
display
,
&
xkb_opcode
,
&
xkb_event
,
&
xkb_error
,
&
xkb_major
,
&
xkb_minor
);
if
(
use_xkb
)
/* we have XKB, approximate Windows behaviour */
XkbSetDetectableAutoRepeat
(
display
,
True
,
NULL
);
}
#endif
/* Initialize OpenGL */
X11DRV_OpenGL_Init
(
display
);
...
...
@@ -427,6 +445,10 @@ struct x11drv_thread_data *x11drv_init_thread_data(void)
if
(
!
(
data
->
xim
=
XOpenIM
(
data
->
display
,
NULL
,
NULL
,
NULL
)))
WARN
(
"Can't open input method
\n
"
);
#ifdef HAVE_XKB
if
(
use_xkb
)
XkbSetDetectableAutoRepeat
(
data
->
display
,
True
,
NULL
);
#endif
if
(
synchronous
)
XSynchronize
(
data
->
display
,
True
);
wine_tsx11_unlock
();
if
(
wine_server_fd_to_handle
(
ConnectionNumber
(
data
->
display
),
GENERIC_READ
|
SYNCHRONIZE
,
...
...
This diff is collapsed.
Click to expand it.
include/x11drv.h
+
1
−
0
View file @
8d361bd4
...
...
@@ -358,6 +358,7 @@ extern unsigned int screen_width;
extern
unsigned
int
screen_height
;
extern
unsigned
int
screen_depth
;
extern
unsigned
int
text_caps
;
extern
int
use_xkb
;
extern
int
use_take_focus
;
extern
int
managed_mode
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment