mirror of
https://github.com/swaywm/sway.git
synced 2024-11-11 04:54:14 +01:00
Fixed mouse clicks from triggering a segfault
This commit is contained in:
parent
85a573dab7
commit
23b90d8e69
@ -322,7 +322,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
// Do checks to determine if proper keys are being held
|
// Do checks to determine if proper keys are being held
|
||||||
swayc_t *view = active_workspace->focused;
|
swayc_t *view = active_workspace->focused;
|
||||||
if (m1_held) {
|
if (m1_held && view) {
|
||||||
if (view->is_floating) {
|
if (view->is_floating) {
|
||||||
while (keys_pressed[i++]) {
|
while (keys_pressed[i++]) {
|
||||||
if (keys_pressed[i] == config->floating_mod) {
|
if (keys_pressed[i] == config->floating_mod) {
|
||||||
@ -338,7 +338,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (m2_held) {
|
} else if (m2_held && view) {
|
||||||
if (view->is_floating) {
|
if (view->is_floating) {
|
||||||
while (keys_pressed[i++]) {
|
while (keys_pressed[i++]) {
|
||||||
if (keys_pressed[i] == config->floating_mod) {
|
if (keys_pressed[i] == config->floating_mod) {
|
||||||
|
Loading…
Reference in New Issue
Block a user