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

[WaylandWindow] Unmap surface before sending activation request #118

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

alebastr
Copy link

@alebastr alebastr commented Feb 26, 2024

Not tested on Hyprland. Lightly tested on Sway.

Let's hope that everything that can happen after mode_result doesn't cause a redraw or is sufficiently protected against not having a surface. Asynchronous list updates, queued events, etc...

Fixes #117

source/wayland/view.c Outdated Show resolved Hide resolved
@lbonn
Copy link
Owner

lbonn commented Feb 26, 2024

Nice, thanks a lot! After a quick test I think it works again with Hyprland.

I just added a small comment on the code organization, let me know what you think.

@LorenzoBettini do you fancy a test as well? :)

@LorenzoBettini
Copy link

@lbonn yes, I'd like to test it :)
what would be the best way to do that?

@lbonn
Copy link
Owner

lbonn commented Feb 26, 2024

@LorenzoBettini

  • git clone https://github.com/alebastr/rofi -b wayland-window-unmap
  • git submodule update --init

Then follow the instructions in https://github.com/lbonn/rofi/blob/wayland/INSTALL.md (only meson will work, not autotools)

eg meson setup build, ninja -C build ...

@LorenzoBettini
Copy link

@lbonn

here's what I've done:

sudo pacman -S meson

cd ~/tmp
git clone https://github.com/alebastr/rofi -b wayland-window-unmap
cd rofi
git submodule update --init

meson setup build
ninja -C build

build/rofi -version
Version: 1.7.5+wayland1-252-gc7472ecc (wayland-window-unmap)

Then I tried (with a few windows in separate hyprland workspaces):

build/rofi -show window

and selecting the window now correctly switches to it (in case, also switching to the corresponding workspaces).

Well done! :)
And thanks for fixing it so fast!

@lbonn
Copy link
Owner

lbonn commented Feb 26, 2024

Great! Thanks for your help.

@alebastr is it fine by you if we merge this now?

@alebastr
Copy link
Author

Thanks for testing!

@lbonn from a brief look, the only public method that touches the surface and does not check it is display_set_surface_dimensions. I guess if that becomes a problem, we could fix it later.

Feel free to merge.

@lbonn lbonn marked this pull request as ready for review February 26, 2024 18:32
@lbonn lbonn merged commit cb6fd22 into lbonn:wayland Feb 26, 2024
4 checks passed
@alebastr alebastr deleted the wayland-window-unmap branch February 27, 2024 05:22
@kRHYME7
Copy link

kRHYME7 commented Feb 27, 2024

Thanks!

@kohane27
Copy link

kohane27 commented Mar 1, 2024

Just want to show my appreciation that running paru -S rofi-lbonn-wayland-git works!

Thank you for fixing it! I really appreciate it!

@LorenzoBettini
Copy link

Thanks again!
Are you going to release this version?

@lbonn
Copy link
Owner

lbonn commented Mar 5, 2024

@LorenzoBettini true, maybe not a bad idea. There have been quite a few fixes since last version.

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.

[BUG] Rofi window mode does not seem to work anymore in Hyprland
5 participants