Merge pull request #2480 from RyanDwyer/fix-mod-resize

Fix mod+resize
This commit is contained in:
emersion 2018-08-18 09:15:30 +01:00 committed by GitHub
commit cfe205b36f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -726,13 +726,13 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
} }
// Via mod+click // Via mod+click
uint32_t btn_resize = config->floating_mod_inverse ?
BTN_LEFT : BTN_RIGHT;
if (mod_pressed && button == btn_resize) {
struct sway_container *floater = cont; struct sway_container *floater = cont;
while (floater->parent->layout != L_FLOATING) { while (floater->parent->layout != L_FLOATING) {
floater = floater->parent; floater = floater->parent;
} }
uint32_t btn_resize = config->floating_mod_inverse ?
BTN_LEFT : BTN_RIGHT;
if (button == btn_resize) {
edge = 0; edge = 0;
edge |= cursor->cursor->x > floater->x + floater->width / 2 ? edge |= cursor->cursor->x > floater->x + floater->width / 2 ?
WLR_EDGE_RIGHT : WLR_EDGE_LEFT; WLR_EDGE_RIGHT : WLR_EDGE_LEFT;