mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
pointer uses its own modifiers
This commit is contained in:
parent
8686142351
commit
8f529536e3
1 changed files with 1 additions and 8 deletions
|
@ -15,7 +15,6 @@
|
||||||
#include "focus.h"
|
#include "focus.h"
|
||||||
|
|
||||||
uint32_t keys_pressed[32];
|
uint32_t keys_pressed[32];
|
||||||
uint32_t key_modifiers;
|
|
||||||
int keys_pressed_length = 0;
|
int keys_pressed_length = 0;
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,10 +26,6 @@ static bool m2_held = false;
|
||||||
static bool resizing = false;
|
static bool resizing = false;
|
||||||
static bool lock_left, lock_right, lock_top, lock_bottom = false;
|
static bool lock_left, lock_right, lock_top, lock_bottom = false;
|
||||||
|
|
||||||
static bool floating_mod_pressed(void) {
|
|
||||||
return key_modifiers & config->floating_mod;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool pointer_test(swayc_t *view, void *_origin) {
|
static bool pointer_test(swayc_t *view, void *_origin) {
|
||||||
const struct wlc_origin *origin = _origin;
|
const struct wlc_origin *origin = _origin;
|
||||||
// Determine the output that the view is under
|
// Determine the output that the view is under
|
||||||
|
@ -295,7 +290,6 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
bool cmd_success = false;
|
bool cmd_success = false;
|
||||||
key_modifiers = modifiers->mods;
|
|
||||||
|
|
||||||
struct sway_mode *mode = config->current_mode;
|
struct sway_mode *mode = config->current_mode;
|
||||||
// Lowercase if necessary
|
// Lowercase if necessary
|
||||||
|
@ -497,7 +491,7 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arrange_windows(pointer->parent, -1, -1);
|
arrange_windows(pointer->parent, -1, -1);
|
||||||
if (floating_mod_pressed()) {
|
if (modifiers->mods & config->floating_mod) {
|
||||||
dragging = m1_held;
|
dragging = m1_held;
|
||||||
resizing = m2_held;
|
resizing = m2_held;
|
||||||
int midway_x = pointer->x + pointer->width/2;
|
int midway_x = pointer->x + pointer->width/2;
|
||||||
|
@ -516,7 +510,6 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
|
||||||
if (button == 272) {
|
if (button == 272) {
|
||||||
m1_held = false;
|
m1_held = false;
|
||||||
dragging = false;
|
dragging = false;
|
||||||
lock_top = lock_bottom = lock_left = lock_right = false;
|
|
||||||
}
|
}
|
||||||
if (button == 273) {
|
if (button == 273) {
|
||||||
m2_held = false;
|
m2_held = false;
|
||||||
|
|
Loading…
Reference in a new issue