aboutsummaryrefslogtreecommitdiff
path: root/sway/input
AgeCommit message (Collapse)Author
2018-07-19Fix crash and render issues involving cursor_send_pointer_motionRyan Dwyer
Fixes #2303, as well as a crash. To replicate the crash: * Have multiple outputs * In config: for_window [<criteria>] workspace foo * Also in config: workspace foo output <left-output-name> * Focus the right output, and ensure workspace foo doesn't exist * Launch the app that triggers the criteria When the view maps, it calls workspace_switch which calls send_set_focus which calls cursor_send_pointer_motion which calls transaction_commit_dirty. This call to transaction_commit_dirty is not meant to happen at this time because the tree isn't guaranteed to be in a consistent state, but I'm not sure how exactly this leads to the crash or render issues. In this case the transaction is already committed by the view implementation's handle_map function. So the solution is to remove it from cursor_send_pointer_motion and add it to the other functions in cursor.c which call cursor_send_pointer_motion.
2018-07-18Don't unfocus when an override redirect window is mappedemersion
2018-07-17Update cursor on focus changeemersion
This allows to send wl_pointer.enter when switching between views in a split/tabbed layout for instance. This (1) updates the cursor image accordingly (2) makes it unnecessary to move the mouse before scrolling. It's harmless to always call cursor_send_pointer_motion because in case the focused surface hasn't changed this is a no-op. The `last_focus != NULL` condition is required otherwise cursor_send_pointer_motion will crash when sway starts up (the sway_output doesn't yet have a workspace).
2018-07-16Merge pull request #2276 from RyanDwyer/urgencyDrew DeVault
Implement urgency base functionality
2018-07-16Fix tab split focus bugRyan Dwyer
Fixes a bug where if you have a tab containing a split, then switch from a non-split tab to the split tab, focus is not changed properly.
2018-07-16Implement urgency base functionalityRyan Dwyer
Introduces a command to manually set urgency, as well as rendering of urgent views, sending the IPC event, removing urgency after focused for one second, and matching urgent views via criteria.
2018-07-15Make focus part of transactionsRyan Dwyer
Rather than maintain copies of the entire focus stack, this PR transactionises the focus by introducing two new properties to the container state and using those when rendering. * `bool focused` means this container has actual focus. Only one container should have this equalling true in its current state. * `struct sway_container *focus_inactive_child` points to the immediate child that was most recently focused (eg. for tabbed and stacked containers).
2018-07-14Implement tap_button_map for input devicesBrian Ashworth
2018-07-13Merge pull request #2252 from rkubosz/scroll-button-optionDrew DeVault
feature: scroll button option for input devices
2018-07-12Fix crash in seat codeRyan Dwyer
Container will be NULL if launching swaylock.
2018-07-11add scroll button optionRobert Kubosz
This commit introduces a scroll_button option, which is intended to be used with scroll_method. Now user can edit his sway config and add an scroll_button option to device section.
2018-07-11fix crash on floating windowsdudemanguy
2018-07-11Move floating windows to front when focusedRyan Dwyer
2018-07-09Update for swaywm/wlroots#1126emersion
2018-07-06Merge branch 'master' into leaksemersion
2018-07-06Merge branch 'master' into remove-input-fixDrew DeVault
2018-07-06Attach destroy handler earlierIan Fan
This prevents it from being bypassed when the device has no seat configuration
2018-07-05Fix pointer button events for layer surfacesBrian Ashworth
2018-07-05keyboard: free xkb keymap on destroyDominique Martinet
2018-07-04Fix focus related damageRyan Dwyer
When you have an unfocused container (so one view is focused_inactive), and you focus any other view in that container, the view with focused_inactive was not damaged. This is because we damaged the previous focus and new focus, but needed to damage the parent of the new focus.
2018-07-02Don't return pending children in seat_get_active_current_childRyan Dwyer
Fixes #2192. seat_get_active_current_child is intended to return a child of the given container which has finished its mapping transaction and is able to be rendered on screen. The previous implementation was capable of returning a pending child, which caused a child of a tabbed or stacked view to be rendered prematurely while it was mapping.
2018-06-29Merge remote-tracking branch 'upstream/master' into atomicRyan Dwyer
2018-06-28fix handling key modifiers if not pressed at firstArmin Preiml
fixes #2169
2018-06-27Merge branch 'master' into xwayland-wants-floatRyan Dwyer
2018-06-24dont focus-follow-mouse when keyboard grabTony Crisci
2018-06-23Fix crash when deleting last child in a tabbed or stacked containerRyan Dwyer
There was no `current` child because the container was destroyed. This makes it fall back to looking in the parent's current children list.
2018-06-18Automatically float xwayland windowsemersion
2018-06-12Fix keyboard shortcut handling inconsistenciesfrsfnrrg
* Ensure that modifier keys are identified even when the next key does not produce a keysym. This requires that modifier change tracking be done for each sway_shortcut_state. * Permit regular and --release shortcuts on the same key combination. Distinct bindings are identified for press and release cases; note that the release binding needs to be identified for both key press and key release events. * Maintain ascending sort order for the shortcut state list, and keep track of the number of pressed key ids, for simpler (and hence faster) searching of the list of key bindings. * Move binding duplicate detection into get_active_binding to avoid duplicating error messages.
2018-06-09Render drag iconsemersion
2018-06-06Initialise previous cursor position.Scott Leggett
Fix the problem with focus jumping to the container under the cursor when first starting sway.
2018-06-04Don't set focus to NULL when clicking a surface which has no containerRyan Dwyer
2018-06-04Restore focus when unmapping layer shell surfacesRyan Dwyer
2018-06-03Fix seat_get_active_childRyan Dwyer
seat_get_active_child is used for tabbed and stacked containers to get the active child. The previous implementation used seat_get_focus_inactive then ascended the tree to the child of the tabbed/stacked container, but this fails when the workspace itself is stacked or tabbed and the most recently active child is floating. The new implementation takes a more simple approach, where it directly scans the focus stack for the first immediate child which isn't the floating container. Fixes #2098.
2018-06-02Make command block implementation genericBrian Ashworth
2018-06-01Style fix, redundant entry removal, fix extra keysym deletefrsfnrrg
2018-06-01Rename update_shortcut_model to update_shortcut_statefrsfnrrg
2018-06-01Rename check_shortcut_model to get_active_bindingfrsfnrrg
2018-06-01Style fixed for keyboard.cfrsfnrrg
2018-06-01Remove almost-always redundant loop in key handlingfrsfnrrg
2018-06-01Rewrite shortcut handling code to avoid hardcoded valuesfrsfnrrg
The same shortcut algorithm is now used for keycodes, raw keysyms, and translated keysyms. Pressed keysyms are now stored in association with the keycodes that generated them. Modifier keycodes (and associated keysyms) are identified retroactively by the subsequent change to the modifier flags.
2018-06-01Fix mouse warping interaction with layout coordsDrew DeVault
2018-06-01Store swayc coordinates as layout-localRyan Dwyer
2018-06-01Implement floatingRyan Dwyer
2018-05-28Fix ancestor typosRyan Dwyer
2018-05-27Merge pull request #2050 from smlx/focus-fixDrew DeVault
Focus containers only on entry.
2018-05-27Implement bindsym/bindcode --lockedfrsfnrrg
Adds the --locked flag to bindsym and bindcode commands. When a keyboard's associated seat has an exclusive client (i.e, a screenlocker), then bindings are only executed if they have the locked flag. When there is no such client, this restriction is lifted.
2018-05-28Improve comment.Scott Leggett
2018-05-28Avoid assert on container type.Scott Leggett
2018-05-28Move previous cursor_position inline.Scott Leggett
2018-05-28Remove unused function.Scott Leggett