Skip to content

Commit 23f427f

Browse files
committed
Not always grabbing mice with keyboard keys on Linux
1 parent 5b89042 commit 23f427f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/server/unix/GrabbedDevicesLinux.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ namespace {
6969
if ((ev_bits & required_ev_bits) != required_ev_bits)
7070
return false;
7171

72-
return ((has_keys(fd) || (grab_mice && is_mouse(fd))) && !is_gamedevice(fd));
72+
return (
73+
(is_mouse(fd) ? grab_mice : has_keys(fd)) &&
74+
!is_gamedevice(fd)
75+
);
7376
}
7477

7578
std::string get_device_name(int fd) {

0 commit comments

Comments
 (0)