Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c36b4193
Commit
c36b4193
authored
Oct 11, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winewayland.drv: Configure win32u keyboard repeat delay and speed.
parent
1975398b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
1 deletion
+30
-1
message.c
dlls/win32u/message.c
+8
-0
ntuser_private.h
dlls/win32u/ntuser_private.h
+3
-0
sysparams.c
dlls/win32u/sysparams.c
+3
-0
wayland_keyboard.c
dlls/winewayland.drv/wayland_keyboard.c
+15
-1
ntuser.h
include/ntuser.h
+1
-0
No files found.
dlls/win32u/message.c
View file @
c36b4193
...
...
@@ -288,6 +288,7 @@ struct send_message_info
};
static
const
INPUT_MESSAGE_SOURCE
msg_source_unavailable
=
{
IMDT_UNAVAILABLE
,
IMO_UNAVAILABLE
};
static
BOOL
keyboard_auto_repeat_enabled
;
/* flag for messages that contain pointers */
/* 32 messages per entry, messages 0..31 map to bits 0..31 */
...
...
@@ -508,6 +509,13 @@ static inline BOOL check_hwnd_filter( const MSG *msg, HWND hwnd_filter )
return
(
msg
->
hwnd
==
hwnd_filter
||
is_child
(
hwnd_filter
,
msg
->
hwnd
));
}
BOOL
set_keyboard_auto_repeat
(
BOOL
enable
)
{
BOOL
enabled
=
keyboard_auto_repeat_enabled
;
keyboard_auto_repeat_enabled
=
enable
;
return
enabled
;
}
/***********************************************************************
* unpack_message
*
...
...
dlls/win32u/ntuser_private.h
View file @
c36b4193
...
...
@@ -242,6 +242,9 @@ HICON alloc_cursoricon_handle( BOOL is_icon );
extern
void
free_dce
(
struct
dce
*
dce
,
HWND
hwnd
);
extern
void
invalidate_dce
(
WND
*
win
,
const
RECT
*
extra_rect
);
/* message.c */
extern
BOOL
set_keyboard_auto_repeat
(
BOOL
enable
)
DECLSPEC_HIDDEN
;
/* window.c */
HANDLE
alloc_user_handle
(
struct
user_object
*
ptr
,
unsigned
int
type
);
void
*
free_user_handle
(
HANDLE
handle
,
unsigned
int
type
);
...
...
dlls/win32u/sysparams.c
View file @
c36b4193
...
...
@@ -6324,6 +6324,9 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
process_layout
=
arg
;
return
TRUE
;
case
NtUserCallOneParam_SetKeyboardAutoRepeat
:
return
set_keyboard_auto_repeat
(
arg
);
/* temporary exports */
case
NtUserGetDeskPattern
:
return
get_entry
(
&
entry_DESKPATTERN
,
256
,
(
WCHAR
*
)
arg
);
...
...
dlls/winewayland.drv/wayland_keyboard.c
View file @
c36b4193
...
...
@@ -219,7 +219,20 @@ static void keyboard_handle_modifiers(void *data, struct wl_keyboard *wl_keyboar
static
void
keyboard_handle_repeat_info
(
void
*
data
,
struct
wl_keyboard
*
wl_keyboard
,
int
rate
,
int
delay
)
{
FIXME
(
"rate=%d delay=%d stub!
\n
"
,
rate
,
delay
);
UINT
speed
;
TRACE
(
"rate=%d delay=%d
\n
"
,
rate
,
delay
);
/* Handle non-negative rate values, ignore invalid (negative) values. A
* rate of 0 disables repeat. */
if
(
rate
>=
80
)
speed
=
31
;
else
if
(
rate
>=
5
)
speed
=
rate
*
400
/
1000
-
1
;
else
speed
=
0
;
delay
=
max
(
0
,
min
(
3
,
round
(
delay
/
250
.
0
)
-
1
));
NtUserSystemParametersInfo
(
SPI_SETKEYBOARDSPEED
,
speed
,
NULL
,
0
);
NtUserSystemParametersInfo
(
SPI_SETKEYBOARDDELAY
,
delay
,
NULL
,
0
);
NtUserCallOneParam
(
rate
>
0
,
NtUserCallOneParam_SetKeyboardAutoRepeat
);
}
static
const
struct
wl_keyboard_listener
keyboard_listener
=
{
...
...
@@ -245,6 +258,7 @@ void wayland_keyboard_init(struct wl_keyboard *wl_keyboard)
return
;
}
NtUserCallOneParam
(
TRUE
,
NtUserCallOneParam_SetKeyboardAutoRepeat
);
pthread_mutex_lock
(
&
keyboard
->
mutex
);
keyboard
->
wl_keyboard
=
wl_keyboard
;
keyboard
->
xkb_context
=
xkb_context
;
...
...
include/ntuser.h
View file @
c36b4193
...
...
@@ -878,6 +878,7 @@ enum
NtUserCallOneParam_ReplyMessage
,
NtUserCallOneParam_SetCaretBlinkTime
,
NtUserCallOneParam_SetProcessDefaultLayout
,
NtUserCallOneParam_SetKeyboardAutoRepeat
,
/* temporary exports */
NtUserGetDeskPattern
,
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment