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

Windows spawn somewhere in the corner #6154

Closed
DADA30000 opened this issue May 19, 2024 · 27 comments
Closed

Windows spawn somewhere in the corner #6154

DADA30000 opened this issue May 19, 2024 · 27 comments
Labels
bug Something isn't working

Comments

@DADA30000
Copy link

Hyprland Version

System/Version info
Hyprland, built from branch  at commit f8857e6072bd85b95393499688872aaf7f088b5b  ().
Date: 2024-05-18
Tag: , commits: 

flags: (if any)


System Information:
System name: Linux
Node name: nixos
Release: 6.9.1
Version: #1-NixOS SMP PREEMPT_DYNAMIC Fri May 17 10:18:09 UTC 2024


GPU information: 
	Flags: bus master, VGA palette snoop, 66MHz, medium devsel, latency 64, NUMA node 0, IOMMU group 11
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117 [GeForce GTX 1650] [10de:1f82] (rev a1) (prog-if 00 [VGA controller])


os-release: ANSI_COLOR="1;34"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="24.05.20240517.4a6b83b"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
IMAGE_ID=""
IMAGE_VERSION=""
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 24.05 (Uakari)"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="24.05 (Uakari)"
VERSION_CODENAME=uakari
VERSION_ID="24.05"


plugins:
  hyprexpo by Vaxry ver 1.0

Bug or Regression?

Bug

Description

wtf.mp4

How to reproduce

Use latest hyprland from git

Crash reports, logs, images, videos

No response

@DADA30000 DADA30000 added the bug Something isn't working label May 19, 2024
@The-Briel-Deal
Copy link
Contributor

Please attach config. Cannot repro.

@DADA30000
Copy link
Author

hyprland.conf.zip

@The-Briel-Deal
Copy link
Contributor

Can you also give steps to reproduce this issue? And can you explain what the issue is? It looks like the auth pop up is popping up in the top right. Is that the the problem?

@DADA30000
Copy link
Author

Before some update, all windows were opening in the center (launcher and auth window), now they are just spawning in random corners, but not in the center, when I will be home I will try to find generation where that problem doesn't occur

@DADA30000
Copy link
Author

And steps to reproduce

  1. Install hyprland using flake on NixOS
  2. Open floating window

@Agent00Ming
Copy link
Contributor

And steps to reproduce

1. Install hyprland using flake on NixOS

2. Open floating window

same energy as "install linux, why no work" 🤣

I suspect it's this

@Plyply99
Copy link

I have the same issue. Any floating window no longer spawns in center of screen but off to upper left corner. I changed nothing in my config.
What I've been doing for the time being is making window rules for all floating windows and popups. Kind of tedious.

Using the latest git no plugins.

@Plyply99
Copy link

Video_2024-05-20_09-44-40.mp4

@The-Briel-Deal
Copy link
Contributor

Video_2024-05-20_09-44-40.mp4

This doesn't look like no config lol. Can you post the config. I am trying this right now and I am not getting this issue. I'll try it with OP's config a later today and update this.

@Plyply99
Copy link

hyprland.zip

Here you are friend.

@Plyply99
Copy link

I wonder if this could be because of a mesa bug as mentioned here:

russelltg/wl-screenrec#47

And here:

https://gitlab.freedesktop.org/mesa/mesa/-/issues/10658

@SnipeXandrej
Copy link

This bug also causes the context menu of nm-applet from tray to appear at the bottom of the screen, making it unusable
Screenshot_20240524_131551

@SnipeXandrej
Copy link

SnipeXandrej commented May 24, 2024

nevermind, doesn't happen anymore in a normal non-nested session (although it did some days ago, weird...)

but the windows spawning in the top-left / bottom-right / bottom-center / whatever corners still happens

@reidlabwastaken
Copy link

it seems the center window rule still works, heres a video showing a popup w/ the center window rule and without

Center:
https://github.com/hyprwm/Hyprland/assets/45904911/6dcd68a5-54fb-4233-a7a2-97fad56e9bd4
Without center:
https://github.com/hyprwm/Hyprland/assets/45904911/0a7ba551-eb65-474b-bf2e-c0e6f812b86e

hyprctl systeminfo (this issue also happened on my nvidia machine fyi)

Hyprland, built from branch  at commit 7ad9116de8d0b7dac27eaf080bd92998a8fb40e5  ().
Date: 2024-05-22
Tag: , commits: 

flags: (if any)


System Information:
System name: Linux
Node name: goopnet-interface
Release: 6.9.0
Version: #1-NixOS SMP PREEMPT_DYNAMIC Tue Jan  1 00:00:00 UTC 1980


GPU information: 
00:02.0 VGA compatible controller [0300]: Intel Corporation Iris Plus Graphics G4 (Ice Lake) [8086:8a5c] (rev 07) (prog-if 00 [VGA controller])
74:00.1 Non-VGA unclassified device [0000]: Apple Inc. T2 Bridge Controller [106b:1801] (rev 01)
74:00.2 Non-VGA unclassified device [0000]: Apple Inc. T2 Secure Enclave Processor [106b:1802] (rev 01)


os-release: ANSI_COLOR="1;34"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="24.05.20240521.5710852"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
IMAGE_ID=""
IMAGE_VERSION=""
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 24.05 (Uakari)"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="24.05 (Uakari)"
VERSION_CODENAME=uakari
VERSION_ID="24.05"


plugins:

@Plyply99
Copy link

it seems the center window rule still works, heres a video showing a popup w/ the center window rule and without

Center: https://github.com/hyprwm/Hyprland/assets/45904911/6dcd68a5-54fb-4233-a7a2-97fad56e9bd4 Without center: https://github.com/hyprwm/Hyprland/assets/45904911/0a7ba551-eb65-474b-bf2e-c0e6f812b86e

hyprctl systeminfo (this issue also happened on my nvidia machine fyi)

Hyprland, built from branch  at commit 7ad9116de8d0b7dac27eaf080bd92998a8fb40e5  ().
Date: 2024-05-22
Tag: , commits: 

flags: (if any)


System Information:
System name: Linux
Node name: goopnet-interface
Release: 6.9.0
Version: #1-NixOS SMP PREEMPT_DYNAMIC Tue Jan  1 00:00:00 UTC 1980


GPU information: 
00:02.0 VGA compatible controller [0300]: Intel Corporation Iris Plus Graphics G4 (Ice Lake) [8086:8a5c] (rev 07) (prog-if 00 [VGA controller])
74:00.1 Non-VGA unclassified device [0000]: Apple Inc. T2 Bridge Controller [106b:1801] (rev 01)
74:00.2 Non-VGA unclassified device [0000]: Apple Inc. T2 Secure Enclave Processor [106b:1802] (rev 01)


os-release: ANSI_COLOR="1;34"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="24.05.20240521.5710852"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
IMAGE_ID=""
IMAGE_VERSION=""
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 24.05 (Uakari)"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="24.05 (Uakari)"
VERSION_CODENAME=uakari
VERSION_ID="24.05"


plugins:

The mesa bug I posted affects AMD. Looks like you're on Intel?

@reidlabwastaken
Copy link

reidlabwastaken commented May 24, 2024

The mesa bug I posted affects AMD. Looks like you're on Intel?

yeah, iris plus g4 (integrated graphics for the i3-1000ng4)
i do not have any AMD gpus on this system

@shvedes
Copy link

shvedes commented May 26, 2024

Same issue after switching to git version (Because the waybar module idle_inhibitor did not work). Seems like it happens only with gnome-polkit window in my case. For example, in the video I opened the zenity window, which appeared in the center as needed. Also, the telegram context menu slides to the center (or above) of the screen when it was invoked at the bottom of the screen (in which case it is expected to be drawn just above the selected message, but not in another part of the screen). I admit that this may be a telegram problem

2024-05-26_18-14-19.mp4

@lionur
Copy link

lionur commented May 26, 2024

I noticed that this behavior happened after this commit 4cdddcf, so it was the last good commit
It happened somewhere here: 121d3a7, 0cfdde3, fc72df8
And on this commit 7eeee2c windows were not spawning in the center anymore
Maybe this helps

@MightyPlaza
Copy link
Contributor

they always seem to spawn at X = width / 2 and Y = height / 2, so there is likely a typo somewhere.

@vaxerski
Copy link
Member

vaxerski commented Jun 2, 2024

patch.txt
like this?

@MightyPlaza
Copy link
Contributor

MightyPlaza commented Jun 2, 2024

close
they now spawn at the center + window_size / 2 instead of center - window_size / 2
edit: lol let me change the patch and test

@MightyPlaza
Copy link
Contributor

diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp
index 108f9039..123f27ac 100644
--- a/src/layout/IHyprLayout.cpp
+++ b/src/layout/IHyprLayout.cpp
@@ -147,7 +147,7 @@ void IHyprLayout::onWindowCreatedFloating(PHLWINDOW pWindow) {
                 pWindow->m_vRealPosition = pWindow->m_pXDGSurface->toplevel->parent->window->m_vRealPosition.goal() +
                     pWindow->m_pXDGSurface->toplevel->parent->window->m_vRealSize.goal() / 2.F - desiredGeometry.size() / 2.F;
             else
-                pWindow->m_vRealPosition = PMONITOR->vecPosition + desiredGeometry.size() / 2.F;
+                pWindow->m_vRealPosition = PMONITOR->vecPosition + PMONITOR->vecSize / 2.F - desiredGeometry.size() / 2.F;
         } else {
             // if it is, we respect where it wants to put itself, but apply monitor offset if outside
             // most of these are popups

fixes it

@vaxerski
Copy link
Member

vaxerski commented Jun 2, 2024

isnt that what I've done? maybe its too late and I am idiot

@vaxerski
Copy link
Member

vaxerski commented Jun 2, 2024

is this fixed now then?

@Agent00Ming
Copy link
Contributor

you might have dropped two commits during force push but that did fix this issue :P
6868a39 and 1cc35cf

@vaxerski
Copy link
Member

vaxerski commented Jun 3, 2024

sometimes I feel like I should revoke the perms to force push to main from myself, muscle memory sometimes does -f...

vaxerski added a commit that referenced this issue Jun 3, 2024
@vaxerski
Copy link
Member

vaxerski commented Jun 3, 2024

done, enjoy

@vaxerski vaxerski closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants