aboutsummaryrefslogtreecommitdiff
path: root/sway/input
AgeCommit message (Collapse)Author
2018-07-24Fix some cases where the cursor doesn't updateRyan Dwyer
cursor_set_image only uploads the named image if it doesn't match the previous named image. This means when setting the cursor image to a surface as given by a client, we have to clear the currently stored image.
2018-07-23Add missing checks to fix 2339Brian Ashworth
2018-07-22Set cursor when beginning resize and move operationsRyan Dwyer
2018-07-22Fix damage when shrinking a floating view using cursorRyan Dwyer
2018-07-22Implement request_move and request_resize for xwayland viewsRyan Dwyer
I discovered we have to send a click event when ending the move or resize operation to make xwayland's requests work correctly.
2018-07-22Fix focus bug with floating containersRyan Dwyer
2018-07-22Consider view's min/max sizes when resizingRyan Dwyer
2018-07-22Store last button and use it when views request to move or resizeRyan Dwyer
2018-07-22Prevent re-uploading the same cursor image multiple timesRyan Dwyer
2018-07-22Replace static handle_end_operation with seat_end_mouse_operationRyan Dwyer
2018-07-22Implement xdg shell request_move and request_resize eventsRyan Dwyer
Also does a few other related things: * Now uses enum wlr_edges instead of our own enum resize_edge * Now uses wlr_xcursor_get_resize_name and removes our own find_resize_edge_name * Renames drag to move for consistency
2018-07-22Use wlr_keyboard_get_modifiersRyan Dwyer
2018-07-22Use separate function for choosing edge cursorRyan Dwyer
2018-07-22Fix clicking xwayland menusRyan Dwyer
2018-07-22Use max multiplier when resizing while preserving ratioRyan Dwyer
2018-07-22Make mod + resize do it from the top left cornerRyan Dwyer
2018-07-22Use WLR_MODIFIER_SHIFTRyan Dwyer
2018-07-22Implement floating_modifier and mouse operations for floating viewsRyan Dwyer
This implements the following: * `floating_modifier` configuration directive * Drag a floating window by its title bar * Hold mod + drag a floating window from anywhere * Resize a floating view by dragging the border * Resize a floating view by holding mod and right clicking anywhere on the view * Resize a floating view and keep aspect ratio by holding shift while resizing using either method * Mouse cursor turns into resize when hovering floating border or corner
2018-07-21Fix urgent timer logic and remove unnecessary header includesRyan Dwyer
2018-07-21Implement force_display_urgency_hintRyan Dwyer
The directive sets the timeout before an urgent view becomes normal again after switching to it from another workspace. Also: * When an xwayland surface removes the urgent hint while the timer is active, we now ignore the request. This happens as soon as the view receives focus, so it was effectively making the timer pointless. * The timeout is now only applied when switching to it from another workspace.
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.