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.28k stars 897 forks source link

X11 app not start in center #3029

Open gfhdhytghd opened 1 year ago

gfhdhytghd commented 1 year ago

Hyprland Version

28

Bug or Regression?

Bug

Description

As you could see, the x11 app which should be right in the center isn’t that center, moved a few pixels IMG_0332

How to reproduce

Build and install Hyprland from the main and install linuxqq or wechat-uos from AUR and start it

Crash reports, logs, images, videos

No response

imxyy1soope1 commented 1 year ago

just try this:

#!/bin/bash

handle() {
    event="${line%%>>*}"
    edata="${line#"$event">>}"
    array=(${edata//,/ })
    if [ ${event} = "openwindow" -a ${array[2]} = "QQ" -a ${array[3]} = "QQ" ]; then
        hyprctl dispatch centerwindow
    fi
}

socat -U - UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done
gfhdhytghd commented 1 year ago

it worked as expected (work for qq but for others like wechat, rofi-dmenu it not work)

memchr commented 1 year ago

Can you just use a windowrulev2, no?

gfhdhytghd commented 1 year ago

of course a windowsrull can solve it, but this problem is obviously a bug and should not be solved by the user.

memchr commented 1 year ago

What kind of bug? I don't understand, are you launching this application floating?

Do you mind publishing your configurations?

gfhdhytghd commented 1 year ago

there is no windowrule about QQ WeChat or such thing, this is a problem of the new hidpi xwayland solution, those x11 windows which should start in the center start right in the center if I use hidpi-patch instead of “force zero scaling”

gfhdhytghd commented 1 year ago

hyprland.txt

gfhdhytghd commented 1 year ago

What kind of bug? I don't understand, are you launching this application floating?

Do you mind publishing your configurations?

for more information ,see https://github.com/hyprwm/Hyprland/issues/2916#issuecomment-1687659423

gfhdhytghd commented 1 year ago

@vaxerski

vaxerski commented 1 year ago

I am aware lol, just have a million other issues open too and something being slightly off-center is not a huge deal

gfhdhytghd commented 1 year ago

yeah, tones of problems need to solve

h0tc0d3 commented 1 year ago

Also faced this problem. + Periodically, xwayland applications(full screen games) lose the cursor. I was able to fix it, info here: https://github.com/hyprwm/Hyprland/pull/2906 Only there was a problem that games periodically lose the cursor. After that, the mouse click LMB moves the cursor to the ceiling(sky).

gfhdhytghd commented 1 month ago

it still happens in the newest git build