hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.74k stars 901 forks source link

Drop down windows and dialogue boxes are being centered and misplaced #3335

Closed sweetbbak closed 1 year ago

sweetbbak commented 1 year ago

Hyprland Version

Hyprland, built from branch at commit 96d555e8e794627bfc561e294e148ab8a9961fcc dirty (). Tag: v0.29.1

Bug or Regression?

Bug

Description

A lot of applications with floating dialogue boxes and menus are being spawned and placed in the center of the desktop. I've noticed this with Godot, Blender, Brave, Qbittorrent (qt5 in general) and almost every XWayland window. Sometimes the menu's are usable in the center of the screen (video 1), and other times it is offset where you can move your mouse around and highlight parts of the menu when your mouse is not over the menu (video 2)

https://github.com/hyprwm/Hyprland/assets/75046310/143c8f1b-16aa-4d6a-9e37-195a7de0acac

https://github.com/hyprwm/Hyprland/assets/75046310/f73255f3-6158-465f-9071-8b4c0e0fa595

Rules I've tried:

## Godot
windowrulev2 = noblur, class:^(.*Godot.*)$, title:^(.*Godot.*)$,
windowrulev2 = noborder, class:^(Godot.*)$, title:^(Godot.*)$,
windowrulev2 = noshadow, class:^(Godot.*)$, title:^(Godot.*)$,
windowrulev2 = opacity 1.0, class:^(Godot.*)$, title:^(Godot.*)$,
windowrulev2 = opaque, class:^(Godot.*)$, title:^(Godot.*)$,
windowrulev2 = float, class:^(Godot.*)$,
windowrulev2 = noanim, class:^(Godot.*)$,
windowrulev2 = float,floating:0,class:^(Godot*)
windowrulev2 = forceinput,class:^(Godot*)
windowrulev2 = windowdance,class:^(Godot*) # allows Godot to move child windows
windowrulev2 = nofocus,class:^(Godot*) # allows Godot to move child windows
# windowrulev2 = forcergbx, class:^(Godot.*)$, title:^(Godot.*)$,
# windowrulev2 = noinitialfocus, class:^(Godot.*)$, title:^(Godot.*)$,

Another issue with Godot specifically is that the class and title are always dynamic according to the project title or pop dialogue. The only parameter that is consistent is "InitialTitle" or "InitialClass"

How to reproduce

Open godot and scroll through the menus. This behavior is noticeable in brave-bin from the AUR, Qbittorrent and some specific parts of Blender.

MightyPlaza commented 1 year ago

likely dupe of https://github.com/hyprwm/Hyprland/issues/3150, update

sweetbbak commented 1 year ago

I dont see how they are related, windows are being centered when they shouldn't be and then behaving weirdly. It's also not an issue with file pickers but with drop down menu's that are inside another client.

That issue has also been closed as fixed.

MightyPlaza commented 1 year ago

you're not on latest build from git, you're on latest release (0.29.1) yes, window placement is an issue for most xwayland programs but wayland native programs shouldn't cause issues (after updating)

sweetbbak commented 1 year ago

Switched to hyprland-git

hyprctl version: Hyprland, built from branch main at commit b0a82c04dfc3f08183d68318a1d0eb4001c99559 dirty (bezier: Remove Todo about N-Point bezier curves. (3352)). Tag: v0.29.1-88-gb0a82c04

Same issue persisting. Or is there an even newer version than that?

MightyPlaza commented 1 year ago

make sure the applications are not running under xwayland (hyprctl clients)

sweetbbak commented 1 year ago

In Blender, Hyprland will allow the drop down menu to be put into the correct position, but when moving the mouse into the zone of the drop down menu the menu just disappears as if it isn't there. Hypr-prop says that Blender isn't using Xwayland. Godot is Xwayland and doesn't work like you said.

vaxerski commented 1 year ago

haunted. I've never seen that happen.

image

can we get your entire config?

sweetbbak commented 1 year ago

It only happens with specific applications. https://github.com/sweetbbak/dots/tree/main/.config/hypr

vaxerski commented 1 year ago

it's your windowrules that cause the issue.

Specifically, these:

windowrulev2 = center,xwayland:1
windowrulev2 = float,xwayland:1

Hyprland does what you told it to.

sweetbbak commented 1 year ago

That was me attempting to troubleshoot the issue. It does it without it as well.

vaxerski commented 1 year ago

well, no. You just have those rules duplicated and all over the place. Launch with the default config and come back if it does that too.

sweetbbak commented 1 year ago

Yea, it did. My bad. I still have the issue with Blender but at this point I'm guessing that it's probably Blenders fault.