mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-24 05:45:57 +01:00
patches: Add patch that suppresses errors when surface is not divisible by scale (#9)
* add surface nondivisible no error patch * rename * add a comment * rename
This commit is contained in:
parent
eee10a3f9c
commit
b9063af512
1 changed files with 35 additions and 0 deletions
35
patches/surface-nondivisible-by-scale.patch
Normal file
35
patches/surface-nondivisible-by-scale.patch
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
This patch suppresses the error when the surface buffer size is not divisible by the scale,
|
||||||
|
and logs a bug message instead. It reverts this commit:
|
||||||
|
https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/18595000f3a21502fd60bf213122859cc348f9af
|
||||||
|
It is intended as a temporary workaround for https://github.com/hyprwm/Hyprland/issues/509
|
||||||
|
diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c
|
||||||
|
index c5044ce4..89e410bc 100644
|
||||||
|
--- a/types/wlr_compositor.c
|
||||||
|
+++ b/types/wlr_compositor.c
|
||||||
|
@@ -209,21 +209,12 @@ static void surface_finalize_pending(struct wlr_surface *surface) {
|
||||||
|
if (!pending->viewport.has_src &&
|
||||||
|
(pending->buffer_width % pending->scale != 0 ||
|
||||||
|
pending->buffer_height % pending->scale != 0)) {
|
||||||
|
- // TODO: send WL_SURFACE_ERROR_INVALID_SIZE error to cursor surfaces
|
||||||
|
- // once this issue is resolved:
|
||||||
|
+ // TODO: send WL_SURFACE_ERROR_INVALID_SIZE error once this issue is
|
||||||
|
+ // resolved:
|
||||||
|
// https://gitlab.freedesktop.org/wayland/wayland/-/issues/194
|
||||||
|
- if (!surface->role
|
||||||
|
- || strcmp(surface->role->name, "wl_pointer-cursor") == 0
|
||||||
|
- || strcmp(surface->role->name, "wp_tablet_tool-cursor") == 0) {
|
||||||
|
- wlr_log(WLR_DEBUG, "Client bug: submitted a buffer whose size (%dx%d) "
|
||||||
|
- "is not divisible by scale (%d)", pending->buffer_width,
|
||||||
|
- pending->buffer_height, pending->scale);
|
||||||
|
- } else {
|
||||||
|
- wlr_surface_reject_pending(surface, surface->resource,
|
||||||
|
- WL_SURFACE_ERROR_INVALID_SIZE,
|
||||||
|
- "Buffer size (%dx%d) is not divisible by scale (%d)",
|
||||||
|
- pending->buffer_width, pending->buffer_height, pending->scale);
|
||||||
|
- }
|
||||||
|
+ wlr_log(WLR_DEBUG, "Client bug: submitted a buffer whose size (%dx%d) "
|
||||||
|
+ "is not divisible by scale (%d)", pending->buffer_width,
|
||||||
|
+ pending->buffer_height, pending->scale);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pending->viewport.has_dst) {
|
Loading…
Reference in a new issue