aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-12desktop/layer_shell.c: Fix misspelled "exclusive"Elyes HAOUAS
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2021-04-12Log wlroots version on startupSimon Ser
Can be useful to make sure a bugfix is included. In the future maybe the wlroots version string could include a commit hash when built from source, too.
2021-04-11container: retain focus position on floating enableRonan Pigott
When a tiling container is floated, the focus stack needs to be appropraitely modified to return the container to its original position in the tree upon floating disable, like i3.
2021-04-11Remove WLR_HAS_XDG_FOREIGN checksSimon Ser
References: https://github.com/swaywm/wlroots/pull/2833
2021-04-11desktop/render: remove unused wlr_gles2_texture_attribsSimon Ser
We were calling wlr_gles2_texture_get_attribs, but we were never using the result.
2021-04-11build: stop checking for logindSimon Ser
wlroots has removed its logind session backend [1]. It now relies on libseat only. [1]: https://github.com/swaywm/wlroots/pull/2786
2021-04-09refactor icon_for_window functionAljaz Gantar
2021-04-09fix type error when class_name noneAljaz Gantar
2021-04-08build: update wlroots dependency version to 0.14.xSimon Ser
The latest commit of Sway always requires the latest commit of wlroots.
2021-04-07build: bump version to 1.6Simon Ser
2021-04-03Add Hungarian translation for the READMEIstván Donkó
Co-authored-by: Tamás Táncos <tamas.tancos@emarsys.com>
2021-04-03readme: make it clearer that meson takes a dir as argumentSimon Ser
"build" can easily be misinterpreted as a Meson subcommand.
2021-04-01output: damage whole output when exiting scanoutRonan Pigott
2021-03-30Remove advice about Firefox from issue templateSimon Ser
Firefox got a lot better. I think now would be a good time to remove the advice from the issue template. We can always add it back if we start getting invalid bug reports again.
2021-03-30ci: add xcb-util-wm dependency for wlrootsSimon Ser
This is now a mandatory dependency for wlroots.
2021-03-25config: allow whitespaces in config pathcolumbarius
2021-03-25Add toggle logic inside DPMS handlerIvan Fedotov
Logic that obtains current DPMS state is put inside the handler. sway_output from which the current DPMS state will be obtained is selected by the following logic: * For '-' and '--' the focused output is used; * For '*' error "Cannot apply toggle to all outputs" is reported; * For everything else all_output_by_name_or_id() is used. Fixes #5929.
2021-03-24build: update version to v1.6-rc2Simon Ser
2021-03-24view: subsurface NULL check in view_from_wlr_surfaceKenny Levinsen
Necessary NULL checks had been added to xdg_shell and xwayland surfaces, but subsurfaces had been missed.
2021-03-22swaybar: fail gracefully on tokener creation failTudor Brindus
This commit adds missing error-handling to the creation of the tokener instance. The stack depth parameter is used to initialize an array that json-c prefaults ahead of time, causing INT_MAX to result in out of memory errors. Also drop the depth to 256 to prevent this OOM. Though this fix is not very satisfactory -- json-c could be made to not prefault -- it should do for now. At the very least, swaybar will not crash. Fixes #6126.
2021-03-21swaybar: use INT_MAX max JSON depth when parsing IPC responseTudor Brindus
There's no inherent limit on the nesting Sway can generate, and the default used by `json_tokener_new`, 32, can plausibly be hit during regular usage. Fixes #6115.
2021-03-21idle_inhibit: Store wlr inhibitor instead of viewKenny Levinsen
When an application inhibited idle, a view pointer was stored and a destroy listener was registered to the wlr inhibitor. As the wlr inhibitor lives longer than the view, this lead to a dangling view pointer between view unmap and inhibitor destroy. Store a pointer to the wlr inhibitor instead of to the view, and look up the view when needed, which may at any point be NULL. This also allows for an inhibitor to remain functional if a surface is re-mapped.
2021-03-21view: Handle NULL role object when role is setKenny Levinsen
wlr_(xdg|xwayland)_surface_from_wlr_surface can return NULL even though wlr_surface_is_(xdg|xwayland)_surface returned true.
2021-03-20ci: Update alpine xwayland package nameKenny Levinsen
2021-03-20swaybar: Use position from wl_pointer.enterKenny Levinsen
Only wl_pointer.motion was used to update pointer position, which would cause issues if the pointer was not moved prior to wl_pointer.button. This also fixes touch input through wl_pointer emulation, which fires wl_pointer.button immediately after wl_pointer.enter. Copied from a similar fix made to swaynag. Closes: https://github.com/swaywm/sway/issues/6109
2021-03-17swaybar: silence missing IconThemePath messagePi-Yueh Chuang
IconThemePath is not a standard property in XDG's StatusNotifierItem specification, so missing this property should not be logged as an error. This patch changes the log level to SWAY_DEBUG when swaybar queries the value of IconThemePath so that swaybar won't log the returned message as an error if IconThemePath does not exist. Closes: https://github.com/swaywm/sway/issues/6092
2021-03-16build: update version to v1.6-rc1Simon Ser
2021-03-12Implement input method keyboard grabxdavidwu
2021-03-12xwayland: simplify override-redirect focus restorationSimon Ser
No need to grab the xwayland surface from the wlr_surface, the parent is already an xwayland surface.
2021-03-11output: simplify layer surface iterationVyivel
2021-03-10container: Add view_container_content_atKenny Levinsen
container_at checks if the position provided matches the currently focused container with view_container_at as a fast path. view_container_at checks using the main container geometry, which includes the titlebar and border area. If a tabbed container is focused, then positions over unfocused tabs are incorrectly reported as belonging to the focused container, breaking focus on click. Add view_container_content_at for use in the focused container fast path which only tests container content area, and fall back to full workspace scans for border and titlebar areas. Closes: https://github.com/swaywm/sway/issues/6074
2021-03-07swaybar: use text subpixel antialias only where it would look goodFenveireth
Closes #5605 Text Subpixel antialiasing is : - FreeType makes glyph bitmaps containing coverage percentage for each subpixel, instead of pixel - Then draw by performing the blend for each subpixel, instead of pixel (e.g. dual-source blending in opengl) And there's only one Alpha channel, so this extra coverage data can't leave Cairo to reach the compositor through there. Therefore, it can't work as intended if output text alpha != bar background alpha. Disable it for those cases, enable it elsewhere As for color emojis, they are RGBA bitmaps. If drawn with text alpha=1.0 and background alpha=1.0 (should be completely opaque bar), then with 'CAIRO_OPERATOR_SOURCE' then texels with alpha < 1.0 result in a blend with whatever's behind the bar, instead of the bar background
2021-03-01container: Limit tiled focus to container geometryKenny Levinsen
container_at would maintain the current focus as long as a position was over one of the container view's surfaces. If an oversized surface was being clipped, this lead to weird focus behavior. Instead, use view_container_at for this test, which intersects the container box before looking at surfaces.
2021-03-01render: Clip surfaces to container boundsKenny Levinsen
If a surface is associated with a sway container, we limit the destination box to the container dimensions. Floating views and popups are exempt from this clipping.
2021-02-25Fix for_window criteria and mouse button bindingsftilde
Previously, the special case handling of scratchpad and unmark commands was (probably accidentally) limited to criteria directly handled in the execute_command function. This would exclude: 1. for_window criteria, as these are handled externally for views and 2. and mouse bindings which select target the node currently under the mouse cursor. As a concrete example `for_window [app_id="foobar"] move scratchpad, scratchpad show` would show (or hide due to the toggling functionality) another window from the scratchpad, instead of showing the window with app_id "foobar". This commit replaces the "using_criteria" flag with "node_overridden" with the more general notion of signifying that the node (and container/workspace) in the current command handler context of the sway config is not defined by the currently focused node, but instead overridden by other means, i.e., criteria or mouse position.
2021-02-25focus: beyond fullscreen when focused explicitlylbonn
When issuing a focus command on a specific container, users expect to proceed it even if is hidden by a fullscreen window. This matches the behavior of i3.
2021-02-25Automatically map built-in touchscreens/tablets to built-in panelsSimon Ser
Detect whether an output is built-in via its type. Detect whether a touchscreen or tablet tool is built-in via its ID_PATH property.
2021-02-25man: document `input XXX map_to_output *`Simon Ser
This is useful to reset the output mapping.
2021-02-25render: handle containers without output when rendering titlesQuantum
In e0a94bee8da3271f942c0881ee18a7e2d4138063, it was believed that if the container is being rendered, it must have an output. This turned out not to be the case. When rendering a container, all its children are rendered, even if the children is positioned off screen and thus not having any output. This is the cause of the crash in #6061. This commit introduces a null-check, which fixes #6061.
2021-02-24output: Reconfigure xcursor when applying output configTadeo Kondrak
Before this commit, when an output had its scale dynamically changed, Sway would not load a cursor theme with the new scale. This results in stale cursor images when moving the cursor into an area controlled by the compositor, like the background or resize areas. To reproduce: - Using IPC, set an output scale to a value that isn't currently used - Move the cursor into a compositor-controlled area - The cursor will not change
2021-02-23build: stop cargo-culting assignment alignmentSimon Ser
The Sway style guide says we shouldn't align assignments.
2021-02-23build: Add dependency on libdrmTadeo Kondrak
As of 66343839b146a54505b746784cd42a8efb844963, sway now uses a libdrm header. Add this dependency to the build system so headers from it can be used on systems where pkg-config is required to find them.
2021-02-23shells: Update comment about size change on commitKenny Levinsen
2021-02-23transaction: Remove unused ready_immediatelyKenny Levinsen
2021-02-23transaction: Note if instructions are server requestsKenny Levinsen
On server request, we need to send configure events to inform the client of the new intended size. If the client changes size itself, sending a configure event will only cause problems. Use transaction_commit_dirty_client to distinguish between the two transaction causes.
2021-02-23Fix wl_shm_format passed to wlr_texture_from_pixelsSimon Ser
See https://github.com/swaywm/wlroots/pull/2744
2021-02-23grimshot: document support for piping to STDOUT.Mark Stosberg
2021-02-22Fix #5643, #5064: rounding issues in floating-point -> integer conversionsDimitris Triantafyllidis
Currently, various floating-point expressions involving the coordinates of borders, titlebars and content surfaces are directly assigned to integers, and so they are rounded towards zero. This results in off-by-one distances between these elements when the signs of their coordinates differ. Fixed by wrapping these expressions with a call to floor before the assignment.
2021-02-23view: Set parent for view_child subsurfaces on initKenny Levinsen
view_child_init was calling view_init_subsurfaces, which did not set the parent attribute for the subchildren. This lead to the subchildren acting as standalone children. If the parent was an xdg_popup, this would make the subchild unaware of the popup position. Introduce view_child_init_subsurfaces for view_child_init to use instead. Closes: https://github.com/swaywm/sway/issues/6038
2021-02-23view: Mark subchildren as unmapped in view_child_destroyKenny Levinsen
The subchildren lose their parent association at this point, so they will not be able to see that the parent is unmapped. Instead, just set the subchildren to be unmapped directly.