Skip to content

Commit

Permalink
Not always grabbing mice with keyboard keys on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Jun 25, 2024
1 parent 5b89042 commit 23f427f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/unix/GrabbedDevicesLinux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ namespace {
if ((ev_bits & required_ev_bits) != required_ev_bits)
return false;

return ((has_keys(fd) || (grab_mice && is_mouse(fd))) && !is_gamedevice(fd));
return (
(is_mouse(fd) ? grab_mice : has_keys(fd)) &&
!is_gamedevice(fd)
);
}

std::string get_device_name(int fd) {
Expand Down

0 comments on commit 23f427f

Please sign in to comment.