aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAge
* Refuse to start when SUID is detectedLibravatar Kenny Levinsen2022-06-03
| | | | | | | This ensures that those surprised by the deprecation of SUID operation receive an error rather than accidentally having sway run as root. This detection will be removed in a future release.
* sway: add bindgesture commandLibravatar Florian Franzen2022-05-30
| | | | Co-authored-by: Michael Weiser <michael.weiser@gmx.de>
* xdg-shell: schedule a configure on maximize requestLibravatar Kirill Primak2022-05-27
| | | | | This commit reverts 03879290dbee26127f6867ef60bc2a7f9a6c8c5f and fc84bcb7fb0ffa29b1f9bed287762241a3473803.
* realtime: request SCHED_RR using CAP_SYS_NICELibravatar Rouven Czerwinski2022-05-18
| | | | | | | | | | | | | | | | | | | | Try to gain SCHED_RR (round-robin) realtime scheduling privileges before starting the server. This requires CAP_SYS_NICE on Linux systems. We additionally register a pthread_atfork callback which resets the scheduling class back to SCHED_OTHER (the Linux system default). Due to CAP_SYS_NICE, setting RLIMIT_RTPRIO has no effect on the process as documented within man 7 sched (from Linux): Privileged (CAP_SYS_NICE) threads ignore the RLIMIT_RTPRIO limit; as with older kernels, they can make arbitrary changes to scheduling policy and priority. See getrlimit(2) for further information on RLIMIT_RTPRIO Note that this requires the sway distribution packagers to set the CAP_SYS_NICE capability on the sway binary. Supersedes #6992
* config: Remove unused mouse binding structureLibravatar Michael Weiser2022-05-11
| | | | | | | Mouse bindings are handled alongside normal bindings. Remove the unused separate data structure definition to avoid confusion. Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
* Implement ext-session-lock-v1Libravatar Daniel De Graaf2022-04-29
|
* sway/input: follow up wlroots input device events renamingLibravatar Simon Zeni2022-03-17
|
* swaynag: allocate button_details with detailsLibravatar Nihal Jere2022-03-15
| | | | | They are used together, so it doesn't make sense to allocate them separately.
* swaybar: remove swaybar_output.input_regionLibravatar Simon Ser2022-03-14
| | | | | No need to keep the region around, we can immediately destroy it after the wl_surface.set_input_region request.
* Replace pcre with pcre2Libravatar ndren2022-03-12
| | | Closes: https://github.com/swaywm/sway/issues/6838
* Remove WLR_SWITCH_STATE_TOGGLE usageLibravatar Simon Ser2022-03-08
| | | | | | Ref [1]. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/4792446ee8f50104bd207d9ccd8558a7e4eb4514
* Remove some erroneous apostrophes in commentsLibravatar Thomas Hebb2022-02-22
|
* xdg-shell: use wlr_xdg_popup in sway_xdg_popupLibravatar Simon Ser2022-02-07
| | | | Improved type safety.
* xdg-shell: use wlr_xdg_toplevel in sway_viewLibravatar Simon Ser2022-02-07
| | | | | | Improved type safety. Closes: https://github.com/swaywm/sway/issues/6813
* xwayland: listen to `request_activate` eventLibravatar Tuomas Yrjölä2022-01-31
| | | | | | | When REAPER submenu is closed `XCB_CLIENT_MESSAGE` with type `NET_ACTIVE_WINDOW` is sent to set focus to parent menu. Closes: https://github.com/swaywm/sway/issues/6324
* input/cursor: pass through pointer hold gesturesLibravatar Tudor Brindus2022-01-22
| | | | | This just follows swaywm/wlroots#3047, so `wl_pointer_gestures_v1` clients can be notified of these events.
* Upgrade for wlroots surface refactoringLibravatar Simon Ser2022-01-13
| | | | | | See [1] for details. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3412
* Destroy sub-surfaces with parent layer-shell surfaceLibravatar Simon Ser2022-01-08
| | | | Closes: https://github.com/swaywm/sway/issues/6337
* output: change output::destroy to output::disableLibravatar Ronan Pigott2021-12-17
| | | | | This changes output::destroy to output::disable and emits it only once when an output is disabled, instead of twice in succession.
* swaynag: remove xdg-output logicLibravatar Simon Ser2021-12-13
| | | | | We can just get the output name from wl_output directly, now that wl_output version 4 exists.
* Add support for linux-dmabuf surface hintsLibravatar Simon Ser2021-12-13
| | | | References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/1376
* Add focused_tab_titleLibravatar Vsevolod2021-12-10
|
* sway: replace noop_output by fallback_outputLibravatar Simon Zeni2021-11-25
| | | | | wlroots removed the support for the noop backend. Instead we rely on the headless backend to provide the fallback output.
* Add 'output render_bit_depth [8|10]' commandLibravatar Manuel Stoeckl2021-11-23
| | | | | | | This makes it possible to hint to the renderer and backends how many bits per channel the buffers that the compositor draws windows onto should have. Renderers and backends may deviate from this if they do not support the formats with higher bit depth.
* sway: create wlr_renderer and wlr_allocatorLibravatar Simon Zeni2021-11-18
| | | | | wlroots now required the compositor to create its own wlr_renderer and wlr_allocator to initialize the wlr_output
* Bump RLIMIT_NOFILELibravatar Simon Ser2021-10-30
| | | | | | | | Wayland compositors handle many file descriptors: client connections, DMA-BUFs, sync_files, wl_data_device pipes, and so on. Bump the limit to the max. Closes: https://github.com/swaywm/sway/issues/6285
* Add smart_gaps inverse_outer commandLibravatar bR3iN2021-10-29
| | | | | | Add a subcommand for `smart_gaps` that enables outer gaps only on workspaces with exactly one visible child. Also add documentation for `smart_gaps toggle`.
* refactor: use JSON_MAX_DEPTH everywhereLibravatar Jason Nader2021-10-25
|
* commands: Remove unused code after 1d3681f52135Libravatar Evgeniy Khramtsov2021-10-01
| | | | | | | | | | | | Clang 13 reports: ../sway/commands.c:470:23: error: variable 'context' set but not used [-Werror,-Wunused-but-set-variable] enum command_context context = 0; ^ Last use of was removed in commit 1d3681f52135. Downstream PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258813
* layer-shell: fix commit handlerLibravatar Kirill Primak2021-09-25
| | | | | | | This commit makes sure the extents are kept up-to-date, fixes not damaging the surface if its layer shell-specific state didn't change, and adds a check if the layer shell-specific state didn't change but the surface got mapped/unmapped, which could affect keyboard focus.
* xdg-shell: remove unused request_maximize listenerLibravatar Kirill Primak2021-09-21
|
* Add -Dnoscanout debug optionLibravatar Simon Ser2021-09-20
| | | | | | This can help debugging direct scan-out issues, such as [1]. [1]: https://github.com/swaywm/wlroots/issues/3185
* swaybar: properly draw blocks with transparent black borderLibravatar Nathan Schulte2021-09-20
| | | | | | while the draw itself is a no-op, alignment must still be accounted this requires more signalling about the blocks (border_set; was the border set?)
* Rename pango_printf to render_textLibravatar Simon Ser2021-09-13
| | | | | This avoids using the pango_ prefix, reserved for functions coming from the Pango library.
* introduce wlr_drm_lease_v1Libravatar Simon Zeni2021-09-09
| | | | | | | | This prevents sway from extending the desktop to i.e. VR headsets, and makes them available for DRM leasing. Non-desktop wlr_outputs will be offered through the wlr_drm_lease_v1_manager interface for client to lease.
* view: fix child position calcLibravatar Kirill Primak2021-09-08
| | | | | Previously, the position was calculated incorrectly for nested subsurfaces.
* seatop_down: End if surface is destroyed or other seatop startsLibravatar Simon Plakolb2021-09-02
| | | | | | If the surface the pointer started to interact with is destroyed we also want the seatop_down to end. In case a drag is initiated we receive a call to handle_end.
* input: Use seatop_down on layer surface clickLibravatar Simon Plakolb2021-09-02
| | | | | | | This solves an issue where layer-shell items would not receive a button release event when the pointer left them while being pressed. The default seatop changes focus immediately while seatop_down defers any focus changes until the pointer is released or seatop_down is destroyed.
* Add `output modeline` commandLibravatar David Rosca2021-08-31
| | | | Only works with DRM backend.
* Use fixed titlebar heightsLibravatar Hugo Osvaldo Barrera2021-08-26
| | | | | | | | | | | | | | | Use fixed titlebar heights. The default height is calculated based on font metrics for the configured font and current locale. Some testing with titles with emoji and CJK characters (which are substantially higher in my setup) shows that the titlebars retain their initial value, text does shift up or down, and all titlebars always remain aligned. Also drop some also now-unecessary title_height calculations. Makes also needed to be updated, since they should be positioned with the same rules.
* layer_shell: damage previous area when a surface shrinksLibravatar Ronan Pigott2021-08-12
| | | | | | | When a layer surface shrinks we need to damage the area it previously occupied, but we don't know the location of all its subsurfaces in the previous state, so instead damage a rectangle that encloses the entire previous extent.
* Document view_mapLibravatar Simon Ser2021-08-12
|
* seatop_down: Change type of sx, sy to double in begin_seatop_downLibravatar David Rosca2021-08-05
| | | | | | | | | | | | | | | Losing the precision resulted in wlr_cursor and wlr_seat::pointer_state getting out of sync during pointer motion in seatop_down. Since the difference was always under 1 px, it was practically impossible to notice in normal use. But because of being out of sync, cursor_rebase would always end up incorrectly calling wlr_seat_pointer_notify_motion from seatop_default_begin (on releasing mouse button) which broke cursor locking. See #5405 Closes #4632
* view: remove reference to wlr_wl_shell_surfaceLibravatar Simon Zeni2021-07-27
|
* Fix wl_pointer.frame not sent on touch emulationLibravatar Simon Ser2021-07-26
| | | | | | | | | | | | When emulating touch, the simulating_pointer_from_touch field is set to true. It's switched back to false when a touch_up event is received. However we need to ensure we always send a wl_pointer.frame event following a group of other wl_pointer events. Since a touch_frame event is always guaranteed to come after a group of touch events, unset simulating_pointer_from_touch in the touch_frame handler instead of the touch_up handler. Add a new field to know whether the touch_frame handler should stop emulation.
* Add support for touch frame eventsLibravatar Simon Ser2021-07-08
| | | | | | Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3001
* Update wlr_box includesLibravatar Simon Ser2021-07-07
| | | | | | Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/3011
* input: Move get_current_time_msec in from utilLibravatar Kenny Levinsen2021-06-23
| | | | | | | get_current_time_msec is only used in cursor.c, so we can move it in and make it static. This is primarily intended to avoid a symbol collision with wlroots, which we unfortunately do not have a good solution for yet.
* Revert "Add workspace {prev,next}_on_output --create"Libravatar Ragnar Groot Koerkamp2021-06-22
| | | | | | | This reverts commit 487c83f0de9ca2a7650ad636eed6fd694ddcb82e. The --create flag is undocumented, not in i3, and at least partially broken (#5913), so this removes the feature.
* Move auto_back_and_forth logic out of workspace_switchLibravatar Ragnar Groot Koerkamp2021-06-18
| | | | | | | | This extracts the code to a separate workspace_auto_back_and_forth function. It also removes the bool argument by adding an extra if statement at the call site, and repurposes the no_auto_back_and_forth variable to auto_back_and_forth for simpler understanding.