Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

backend/wayland: fix resizing #1486

Merged
merged 1 commit into from
Jan 22, 2019

Conversation

RedSoxFan
Copy link
Member

@RedSoxFan RedSoxFan commented Jan 22, 2019

Fixes #1371

Before resizing the egl window, the buffers must be swapped

backend/wayland/output.c Outdated Show resolved Hide resolved
@emersion
Copy link
Member

Hmm, is this normal EGL behaviour?

@emersion
Copy link
Member

According to the EGL spec section 3.10.1.1 "Native Window Resizing":

If the native window corresponding to surface has been resized prior to the swap, surface must be resized to match. surface will normally be resized by the EGL implementation at the time the native window is resized. If the implementation cannot do this transparently to the client, then eglSwapBuffers must detect the change and resize surface prior to copying its pixels to the native window.

@emersion
Copy link
Member

wlr_renderer_begin will call glViewport, maybe it's related?

Are we correctly damaging the whole output on resize?

Before resizing the egl window, the buffers must be swapped
@RedSoxFan
Copy link
Member Author

It looks like the buffers just needed to be swapped before resizing

@emersion
Copy link
Member

emersion commented Jan 22, 2019

Instead, does wlr_output_damage_whole after resizing fix it? I think it would be a better solution.

@RedSoxFan
Copy link
Member Author

Nope

Copy link
Member

@emersion emersion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird

@emersion emersion merged commit 88ee102 into swaywm:master Jan 22, 2019
@emersion
Copy link
Member

Thanks!

@RedSoxFan RedSoxFan deleted the fix-wayland-backend-resize branch January 22, 2019 20:20
emersion added a commit to emersion/wlroots that referenced this pull request Jun 2, 2020
This was introduced in [1]. However after reverting that PR I still
can't reproduce the bug the PR aimed to fix [2].

Since there's no good explanation why we would need to swap buffers
before resizing, let's just revert the PR.

[1]: swaywm#1486
[2]: swaywm#1371

Closes: swaywm#1768
ddevault pushed a commit that referenced this pull request Jun 2, 2020
This was introduced in [1]. However after reverting that PR I still
can't reproduce the bug the PR aimed to fix [2].

Since there's no good explanation why we would need to swap buffers
before resizing, let's just revert the PR.

[1]: #1486
[2]: #1371

Closes: #1768
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants