aboutsummaryrefslogtreecommitdiff
path: root/sway/input/cursor.c
AgeCommit message (Collapse)Author
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-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-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-09Update for swaywm/wlroots#1126emersion
2018-07-05Fix pointer button events for layer surfacesBrian Ashworth
2018-06-24dont focus-follow-mouse when keyboard grabTony Crisci
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-01Store swayc coordinates as layout-localRyan Dwyer
2018-06-01Implement floatingRyan Dwyer
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-28Simplify logic, remove redundant variables.Scott Leggett
2018-05-28Rely on view_is_visible rather thank walking the tree ourselves.Scott Leggett
2018-05-28Store previous position in sway_cursor.Scott Leggett
2018-05-27Focus containers only on entry.Scott Leggett
2018-05-26Replace oft-failing abort with if statementDrew DeVault
Fixes #2045
2018-05-26Check for next_focus before assertIvan Chebykin
2018-05-26Fix usage of sway_assertIvan Chebykin
2018-05-26Moved visibility check of of loop, added assertsIvan Chebykin
2018-05-25Break after first tabbed/stacked layoutIvan Chebykin
2018-05-25Fix mouse focusing for horizontal/vertical views in tabbed containersIvan Chebykin
2018-05-25Fixed styling issuesIvan Chebykin
2018-05-25Focus inactive container instead of checking cursor positionIvan Chebykin
2018-05-25Skip all nested containersIvan Chebykin
2018-05-25Implement correct focusing for tabbed containersIvan Chebykin
2018-05-25Fix focusing from other containersIvan Chebykin
2018-05-25Don't focus tabbed and stacked containers on mouseoverIvan Chebykin
2018-05-21Fix focus follows mouse with no focusDrew DeVault
2018-05-21Implement tabbed layoutRyan Dwyer
2018-05-20Fix border commands from changing focusBrian Ashworth
2018-05-20Fix focus_follows_mouse over swaybarDrew DeVault
If you moved your mouse over swaybar (e.g. to scroll between workspaces), focus would move to the workspace. This is not the right thing to do. The solution is complicated by the fact that if you move your mouse into a new output with an empty workspace, that workspace _should_ receive focus.
2018-05-13Idle handling for dpms/lockscreen et alMattias Eriksson
Swayidle handles idle events and allows for dpms and lockscreen handling. It also handles systemd sleep events, and can raise a lockscreen on sleep Fixes #541
2018-05-12Send pointer discrete axis values and sourceemersion
Update for swaywm/wlroots#970
2018-05-03Hide cursor on touch downDrew DeVault
2018-05-02Implement basic touch supportDrew DeVault
This required changing container_at_cursor to container_at_coords so that we could get the appropriate surface (and sx/xy) without moving the cursor. Future work: - Simulate a cursor for clients which have not bound to wl_touch - Keep sending motion events when moving outside the surface (#1892) - Bind gestures to sway commands
2018-04-27Update for swaywm/wlroots#923emersion
2018-04-26Add map_from_region commandemersion
2018-04-21Default to current time when triggering cursor eventsemersion
2018-04-21Update cursor when workspace focus changesemersion
2018-04-18Fullscreen rendering and input fixes.Ryan Dwyer
* Render background when using fullscreen, because transparency. * Check that fullscreen surface allows input. * Don't look for surfaces in top layer if there's a fullscreen view.
2018-04-18More fullscreen fixes.Ryan Dwyer
* Render fullscreen views without wlr function, which makes popups and lockscreen work. * Don't allow input events to surfaces behind fullscreen views. * Use correct output dimensions (for rotated outputs).
2018-04-10Implement cursor event simulation with sway commands.Danny Bautista
2018-04-08Fix cursor motion issuesDrew DeVault
Use only one canonical cursor x/y position and send cursor enter when mouse is warped. Tangentally related to #1714
2018-04-08Use wlr_surface_point_accepts_input for unmanaged surfacesemersion
2018-04-08Implement tablet tool supportDrew DeVault
2018-04-06Fix focus_follows_mouse issuesDrew DeVault