aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAge
* Fix crash when quitting a QT app on the wayland backend using menuLibravatar Ryan Dwyer2018-10-22
| | | | | | | | | | | QT unmaps the view before destroying the popup. We destroyed the popup in response to the view unmapping, but then we'd attempt to destroy it a second time which caused a crash. The patch removes the listener. I tested it with GTK as well, and can confirm the popup is still being destroyed.
* Parse missing i3 window typesLibravatar Christian2018-10-21
| | | | fixes the parsing part of #2906
* Make workspace back_and_forth seat-specificLibravatar Ryan Dwyer2018-10-21
| | | | | | | | * When using multiple seats, each seat has its own prev_workspace_name for the purpose of workspace back_and_forth. * Removes prev_workspace_name global variable. * Removes unused next_name_map function in tree/workspace.c. * Fixes memory leak in seat_destroy (seat was not freed).
* Remove raise_floating directiveLibravatar Ryan Dwyer2018-10-20
| | | | | | | | | | | | | The directive controlled whether floating views should raise to the top when the cursor is moved over it while using focus_follows_mouse. The default was enabled, which is undesirable. For example, if you have two floating views where one completely covers the other, the smaller one would be inaccessible because moving the mouse over the bigger one would raise it above the smaller one. There is no known use case for having raise_floating enabled, so this patch removes the directive and implements the raise_floating disabled behaviour instead.
* Minor refactor of input managerLibravatar Ryan Dwyer2018-10-20
| | | | | | | | | | | | | | | | | | | | | The input manager is a singleton object. Passing the sway_input_manager argument to each of its functions is unnecessary, while removing the argument makes it obvious to the caller that it's a singleton. This patch removes the argument and makes the input manager use server.input instead. On a similar note: * sway_input_manager.server is removed in favour of using the server global. * seat.input is removed because it can get it from server.input. Due to a circular dependency, creating seat0 is now done directly in server_init rather than in input_manager_create. This is because creating seats must be done after server.input is set. Lastly, it now stores the default seat name using a constant and removes a second reference to seat0 (in input_manager_get_default_seat).
* Introduce cursor_rebaseLibravatar Ryan Dwyer2018-10-19
| | | | | This function "rebases" the cursor on top of whatever is underneath it, without triggering any focus changes.
* Fix logic used for mouse_warping outputLibravatar Ryan Dwyer2018-10-19
| | | | | Turns out we don't need to store the previous focus, and it should be based on which output the cursor was in.
* Merge pull request #2875 from RedSoxFan/input-device-bindingsLibravatar Drew DeVault2018-10-19
|\ | | | | cmd_bind{sym,code}: Implement per-device bindings
| * cmd_bind{sym,code}: Implement per-device bindingsLibravatar Brian Ashworth2018-10-18
| | | | | | | | | | bindsym --input-device=<identifier> ... bindcode --input-device=<identifier> ...
* | Consider cursor warp when switching workspacesLibravatar Ryan Dwyer2018-10-19
|/ | | | | | | | | Fixes a regression introduced in 24a90e5d86441fc345356eb3767e5a6880dcedbd. consider_warp_to_focus has been renamed to seat_consider_warp_to_focus, moved to seat.c and made public. It is now called when switching workspaces via `workspace <ws>`.
* swaybar: separate input code to new fileLibravatar Ian Fan2018-10-18
|
* Remove cursor warping from seat_set_focusLibravatar Ryan Dwyer2018-10-18
| | | | | | | | | | | | Because cursor warping was the default behaviour in seat_set_focus, there may be cases where we may have been warping the cursor unintentionally. This patch removes cursor warping from seat_set_focus and only does it in the focus command. This is managed by a static function in focus.c. To know whether to warp or not, we need to know which node had focus previously. To keep track of this easily, seat->prev_focus has been introduced and is set to the previous in seat_set_focus.
* Merge pull request #2820 from Emantor/fix-mouse-warping-containerLibravatar Drew DeVault2018-10-17
|\ | | | | Fix mouse warping container
| * cursor: functions to warp cursor to container and workspaceLibravatar Rouven Czerwinski2018-10-16
| | | | | | | | | | | | The new functions allow a cursor to be warped without changing the focus. This is a preparation commit to handle cursor warping not only in seat_set_focus_warp.
| * view: move arrange_workspace into view_mapLibravatar Rouven Czerwinski2018-10-16
| | | | | | | | | | | | | | | | | | | | For mouse_warping cursor to correctly work on newly spawned containers, the workspace needs to be arranged before the cursor is warped. The shell functions each implement their own fullscreen and arrange checks, move them into the view_map function and pass their states via boolean arguments. Fixes #2819
* | Prevent duplicate workspace::focus eventsLibravatar Ryan Dwyer2018-10-16
| | | | | | | | | | | | | | | | | | | | | | | | Previously we would compare the last focus's workspace with the new focus's workspace to determine if we need to emit an IPC workspace::focus event. This doesn't work when moving the focused container to a new workspace. This adds a workspace property to the seat which stores the last emitted workspace::focus workspace. Using this method, after moving the container, refocusing it will trigger exactly one workspace::focus event: from the old workspace to the new workspace.
* | Introduce seat_set_raw_focus and remove notify argument from seat_set_focus_warpLibravatar Ryan Dwyer2018-10-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces seat_set_raw_focus: a function that manipulates the focus stack without doing any other behaviour whatsoever. There are a few places where this is useful, such as where we set focus_inactive followed by another call to set the real focus again. With this change, the notify argument to seat_set_focus_warp is also removed as these cases now use the raw function instead. A bonus of this is we are no longer emitting window::focus IPC events when setting focus_inactive, nor are we sending focus/unfocus events to the surface. This also fixes the following: * When running `move workspace to output <name>` and moving the last workspace from the source output, the workspace::focus IPC event is no longer emitted for the newly created workspace. * When splitting the currently focused container, unfocus/focus events will not be sent to the surface when giving focus_inactive to the newly created parent, and window::focus events will not be emitted.
* | Event loop: Fix memmove and remove extraneous declarationLibravatar Ryan Dwyer2018-10-15
| |
* | Remove timerfd from loop implementationLibravatar Ryan Dwyer2018-10-15
| | | | | | | | | | timerfd doesn't work on the BSDs, so this replaces it with a timespec for the expiry and uses a poll timeout to check the timers when needed.
* | swaylock: Don't wait too long for surface damage before verifyingLibravatar Ryan Dwyer2018-10-15
| |
* | swaylock: clear password after 10 secondsLibravatar Ryan Dwyer2018-10-15
| |
* | swaylock: Remove indicator after 3 secondsLibravatar Ryan Dwyer2018-10-15
| |
* | swaylock: Use common event loopLibravatar Ryan Dwyer2018-10-15
| |
* | Move swaybar's event loop to common directory and refactorLibravatar Ryan Dwyer2018-10-15
| | | | | | | | | | | | | | * The loop functions are now prefixed with `loop_`. * It is now easy to add timers to the loop. * Timers are implemented using pollfd and timerfd, rather than manually checking them when any other event happens to arrive.
* | swaybar: send signal to status when hiding or showing barLibravatar Ian Fan2018-10-14
| |
* | swaybar: show hidden bar on urgencyLibravatar Ian Fan2018-10-14
| |
* | swaybar: show hidden bar on key eventLibravatar Ian Fan2018-10-14
| | | | | | | | | | | | Since wayland does not currently allow swaybar to create global keybinds, this is handled within sway and sent to the bar using a custom event, so as not to pollute existing events, called bar_state_update.
* | swaybar: handle mode/hidden_state changesLibravatar Ian Fan2018-10-14
| | | | | | | | | | | | | | | | | | As well as adding the hidden_state property to the bar config struct, this commit handles barconfig_update events when the mode or hidden_state changes, and uses a new function determine_bar_visibility to hide or show the bar as required, using, respectively, destroy_layer_surface, which is also newly added, and add_layer_surface, which has been changed to allow dynamically adding the surface.
* | swaybar: move mode & mode_pango_markup to bar structLibravatar Ian Fan2018-10-14
| | | | | | | | | | | | This distinguishes the binding mode from the distinct config mode, as well as removing mode_pango_markup from the config struct where it should not be present.
* | swaybar: add free_hotspots helper functionLibravatar Ian Fan2018-10-14
| |
* | swaybar: annotate wl_list properties in definitionsLibravatar Ian Fan2018-10-14
| |
* | swaybar: save id upon startupLibravatar Ian Fan2018-10-14
| | | | | | | | | | This adds an id property to the bar, which will be used to filter barconfig_update events
* | Merge pull request #2808 from RedSoxFan/bar-subcommandsLibravatar Drew DeVault2018-10-14
|\ \ | | | | | | Fix bar subcommand handler structs and selection
| * | Fix bar subcommand handler structs and selectionLibravatar Brian Ashworth2018-10-13
| |/
* / fix_edge_gaps: Allow negative values for outer gaps.Libravatar Tarmack2018-10-13
|/ | | | While allowing negative values for the outer gaps it is still prevented that negative values move windows out of the container. This replaces the non-i3 option for edge_gaps.
* Merge branch 'master' into bar-bindsymLibravatar Ian Fan2018-10-10
|\
| * Add mouse_warping containerLibravatar Rouven Czerwinski2018-10-10
| | | | | | | | | | | | | | This option always moves the cursor into the middle of the container if the warp variable is true in seat_set_focus_warp. Fixes #2577
| * resize: Determine if anything changed using before/after checkLibravatar Ryan Dwyer2018-10-09
| | | | | | | | | | | | Returning a boolean from container_resize_tiled and resize_tiled doesn't work in all cases. This patch changes it back to void and does a before/after check to see if the container was resized.
* | Implement bar bindsymLibravatar Brian Ashworth2018-10-09
|/
* Merge pull request #2772 from RyanDwyer/improve-popup-damageLibravatar Drew DeVault2018-10-09
|\ | | | | Only damage popups when popups have damage
| * Only damage popups when popups have damageLibravatar Ryan Dwyer2018-10-07
| | | | | | | | | | | | | | | | | | | | | | The previous behaviour was to damage the entire view, which would recurse into each popup. This patch makes it damage only the popup's surface, and respect the surface damage given by the client. This adds listeners to the popup's map and unmap events rather than doing the damage in the create and destroy functions. To get the popup's position relative to the view, a new child_impl function get_root_coords has been introduced, which traverses up the parents.
* | Introduce container_is_transient_forLibravatar Ryan Dwyer2018-10-08
| |
* | Implement popup_during_fullscreenLibravatar Ryan Dwyer2018-10-08
| | | | | | | | | | | | | | | | | | | | This introduces a new view_impl function: is_transient_for. Similar to container_has_ancestor but works using the surface parents rather than the tree. This patch modifies view_is_visible, container_at and so on to allow transient views to function normally when they're in front of a fullscreen view.
* | Reload config using idle eventLibravatar Ryan Dwyer2018-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes it so when you run reload, the actual reloading is deferred to the next time the event loop becomes idle. This avoids several use-after-frees and removes the workarounds we have to avoid them. When you run reload, we validate the config before creating the idle event. This is so the reload command will still return an error if there are validation errors. To allow this, load_main_config has been adjusted so it doesn't apply the config if validating is true rather than applying it unconditionally. This also fixes a memory leak in the reload command where if the config failed to load, the bar_ids list would not be freed.
* | Shim client.background and client.placeholderLibravatar Drew DeVault2018-10-07
|/ | | | | | | These are not supported by sway, but are valid i3 commands and should not cause config errors. Also includes a couple of minor touch-ups.
* swaylock: Support keyboard and pointer disconnects and reconnectsLibravatar Ryan Dwyer2018-10-06
|
* Remove obsolete base64.c fileLibravatar Ian Fan2018-10-04
|
* Fix focusing topmost floating windowsLibravatar Jonathan Buch2018-10-03
| | | | | | | | | | | | Re-focus on the container on which the cursor hovers over. A special case is, if there are menus or other subsurfaces open in the focused container. It will prefer the focused container as long as there are subsurfaces. This commit starts caching the previous node as well as the previous x/y cursor position. Re-calculating the previous focused node by looking at the current state of the cursor position does not work, if the environment changes.
* Add configuration for raising containers on focusLibravatar Jonathan Buch2018-10-03
| | | | | | | * New configuration option: raise_floating (From the discussion on https://github.com/i3/i3/issues/2990) * By default, it still raises the window on focus, otherwise it will raise the window on click.
* Merge pull request #2703 from RyanDwyer/csd-borderLibravatar Drew DeVault2018-10-03
|\ | | | | Add CSD to border modes