Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing wl_surface.enter events for outputs enabled at runtime. #3585

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

hbatagelo
Copy link
Contributor

In my previous fix for #3414, I accidentally disabled sending wl_surface.enter events for surfaces on outputs enabled at runtime. This PR resolves that issue while still addressing #3414.

@hbatagelo hbatagelo requested a review from a team as a code owner September 4, 2024 20:58
@AlanGriffiths
Copy link
Collaborator

AlanGriffiths commented Sep 5, 2024

[This may be spurious - I just noticed the amd64 snap build failed and I was testing edge]

Trying this (miriway --channel=edge/mir-pr3585) I find that disconnecting an external monitor gives:

[1204127.872] [email protected](nil)

When the display adapts (not sure "nil" is the best we can do but...)

When reconnecting again:

expect: an enter event when the display adapts
actual: there's no enter

Curiously, when disabling & enabling the same output I do see the enter event as expected.

Copy link
Collaborator

@AlanGriffiths AlanGriffiths left a comment

Choose a reason for hiding this comment

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

Yep

@tarek-y-ismail
Copy link
Contributor

tarek-y-ismail commented Sep 5, 2024

[This may be spurious - I just noticed the amd64 snap build failed and I was testing edge]

Trying this (miriway --channel=edge/mir-pr3585) I find that disconnecting an external monitor gives:

[1204127.872] [email protected](nil)

When the display adapts (not sure "nil" is the best we can do but...)

When reconnecting again:

expect: an enter event when the display adapts actual: there's no enter

Curiously, when disabling & enabling the same output I do see the enter event as expected.

So disconnecting and reconnecting the monitor physically doesn't call enter, but disabling/re-enabling it through software does?

@AlanGriffiths
Copy link
Collaborator

So disconnecting and reconnecting the monitor physically doesn't call enter, but disabling/re-enabling it through software does?

Weird huh? (But I was testing main, not this PR)

@tarek-y-ismail
Copy link
Contributor

Well, when I use i3 and physically disconnect the HDMI on my external monitor, it doesn't call xrandr to update the output state, maybe this is a similar situation?

@hbatagelo
Copy link
Contributor Author

Hmm, miriway --channel=edge/mir-pr3585 works fine for me:

$ WAYLAND_DEBUG=1 gnome-calculator 2>&1 | grep -E "wl_surface.*?(enter|leave)"
[ 244392.196] [email protected](wl_output@16)

Unplug HDMI:

[ 249616.380] [email protected](wl_output@16)

Plug it back:

[ 253946.082] [email protected](wl_output@29)

@AlanGriffiths
Copy link
Collaborator

Hmm, miriway --channel=edge/mir-pr3585 works fine for me:

See "This may be spurious - I just noticed the amd64 snap build failed and I was testing edge"

@AlanGriffiths AlanGriffiths added this pull request to the merge queue Sep 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 5, 2024
@AlanGriffiths AlanGriffiths added this pull request to the merge queue Sep 6, 2024
Merged via the queue into main with commit 99e8ffa Sep 6, 2024
37 checks passed
@AlanGriffiths AlanGriffiths deleted the bugfix/surface-enter branch September 6, 2024 14:11
AlanGriffiths added a commit that referenced this pull request Sep 9, 2024
…#3585)

In my [previous fix](#3430) for
#3414, I accidentally disabled sending `wl_surface.enter` events for
surfaces on outputs enabled at runtime. This PR resolves that issue
while still addressing #3414.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants