Commit graph

12 commits

Author SHA1 Message Date
Daniel Eklöf
ba46a039ac
wayland: refactor: wrap wl_surface pointers in a wayl_surface struct
And add a viewport object to accompany the surface (to be used when
scaling the surface).

Also rename the wl_surf_subsurf struct to wayl_sub_surface, and add a
wayl_surface object to it, rather than a plain wl_surface pointer (to
also get the viewport pointer).
2023-06-29 15:38:23 +02:00
Daniel Eklöf
3b41379be4
quirks: sway does not damage surface beneath sub-surface, when unmapped
When unmapping a sub-surface, Sway <= 1.8 does not damage the surface
beneath the sub-surface.

https://github.com/swaywm/sway/issues/6960

The workaround is to manually damage the main surface. Previously,
this was done when exiting scrollback search, and after the ‘flash’
OSC. But other sub-surfaces, that may also be unmapped, did not.

This patch adds a quirk handler that does this, and calls it when:

* Exiting scrollback search
* Ending the ‘flash’ OSC
* Exiting unicode input mode
* Clearing URL labels
* Removing the scrollback position indicator

Closes #1335
2023-05-12 14:51:05 +02:00
Daniel Eklöf
2a83202fdd
wayland: apply CSD/SSD changes in the surface configure event
The configure event asks the client to change its decoration
    mode. The configured state should not be applied immediately.
    Clients must send an ack_configure in response to this event.
    See xdg_surface.configure and xdg_surface.ack_configure for
    details.

In particular, ”the configured state should *not* be applied
immediately”.

Instead, treat CSD/SSD changes like all other window dimension related
changes: store the to-be mode in win->configure, and apply it in the
surface configure event.

This fixes an issue where foot incorrectly resized the window when the
server switched between CSD/SSD at run-time.
2021-06-23 12:37:56 +02:00
Daniel Eklöf
29776dbd1f
quirk: remove plasma/kwin quirk
Older version of Plasma/KWin had an issue where buffer damage recorded
before the buffer was attached were ignored. This appears to have been
fixed now.
2021-05-12 20:08:40 +02:00
Daniel Eklöf
587f04f2e1
csd: use wayl_win_subsurface_new/destroy() 2021-02-17 21:48:07 +01:00
Daniel Eklöf
69c3e74498
util.h: new header file defining commonly used macros 2020-05-01 11:46:24 +02:00
Daniel Eklöf
b42709525c
quirks: add KDE quirk: surface must be damaged *after* being attached
KDE resets all surface damage when a buffer is attached. Add a quirk
that adds a full-buffer damage to the surface. This quirk is intended
to be called after attaching a buffer to a surface.
2020-03-24 17:44:17 +01:00
Daniel Eklöf
51a9ff6b04
quirks: weston_csd_{on,off}: don't do anything in fullscreen mode 2020-03-12 09:39:53 +01:00
Daniel Eklöf
e077290c56
quirks: add shortcut for flipping all CSD surfaces sync/desync state 2020-03-03 18:20:09 +01:00
Daniel Eklöf
b268b69a7b
quirks: log when applying weston sub-surface desync quirk 2020-03-02 18:47:04 +01:00
Daniel Eklöf
b6f8a2e422
search: enable/disable weston sub-surface desync quirk when rendering search box 2020-03-01 13:06:00 +01:00
Daniel Eklöf
b8d79c719b
render: search: mark visible portion of sub-surface opaque 2020-03-01 12:54:27 +01:00