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

Issues on 4k screen with 200% scaling #605

Open
DrGeor opened this issue Sep 2, 2024 · 6 comments
Open

Issues on 4k screen with 200% scaling #605

DrGeor opened this issue Sep 2, 2024 · 6 comments
Labels
bug Something isn't working GNOME This affects GNOME only Linux This affects Kando on Linux

Comments

@DrGeor
Copy link

DrGeor commented Sep 2, 2024

Short Summary

Using Gome with a 4k screen set at 3840x2160 and 200% scaling in settings causes problems with menus opening at mouse pointer.

Steps to Reproduce the Issue

  1. Set resolution to 3840x2160 in Gnome display settings
  2. Set scaling to 200%
  3. Scale Kando menus using ctrl-shift + increases menu size
  4. Menus do not open at mouse pointer, and sometimes are off screen.
    ...

Kando Version

v1.3.0

Installation Method

Via a portable zip archive downloaded from a release on GitHub

Desktop Environment

GNOME on Wayland

Environment Version

Gnome 46 on Arch latest

Additional Information

No response

@DrGeor DrGeor added the bug Something isn't working label Sep 2, 2024
@Schneegans
Copy link
Contributor

Schneegans commented Sep 7, 2024

Hi there! Sorry for the late reply. But I fear, I cannot reproduce this. Have you tried enabling fractional scaling? This makes a difference even if the scaling is set to 200%. However, for me it works properly in both cases.

Does the issue only happen for an increased menu size? Or also at the standard size (Ctrl+0)?

@Schneegans Schneegans added Linux This affects Kando on Linux GNOME This affects GNOME only labels Sep 7, 2024
@DrGeor
Copy link
Author

DrGeor commented Sep 8, 2024

Hi Simon,
As always, great work. Loving the new menu themes.

I have 2 GPUs on my linux pc, internal Intel UHD730 and discrete NVIDIA 4060.
The monitor is normally plugged into the NVIDIA card, and initially I thought this might be the problem (NVIDIA cards are notoriously problematic), so I have done some testing with both GPUs.

Internal Intel UHD730.
Resolution 3840x2160 scaling 200% (without fractional scaling) = Menu does NOT open at mouse pointer. Same for ctrl-0 and larger.
Resoution 3840x2160 scaling 200% ( WITH fractional scaling) = Menu opens at mouse pointer correctly. Same for ctrl-0 and larger. The only issue is when using kando scaling ctrl-shift+ with mouse pointer at far right or bottom, the menu is partially off screen, this does not happen at far top or left.

discrete Nvidia 4060.
Exactly the same as above.

It is interesting that it works for you without fractional scaling.....maybe a setting on my pc or driver issues.
Fractional scaling works, but menu shows partially off-screen when mouse pointer is far right or bottom.

So, with fractional scaling no major issues.

Hope this helps.

@Schneegans
Copy link
Contributor

And that's all on Wayland? Can you also test this on X11?

@DrGeor
Copy link
Author

DrGeor commented Sep 8, 2024

Good point!
I have now tested with X11 and the menu opens at the mouse pointer without fractional scaling.

So, Wayland is a problem without fractional scaling.

However, when far right or bottom with kando scaling the menu is still partially cut off with X11.

Happy to help.

@Shoxx98
Copy link

Shoxx98 commented Dec 24, 2024

I am on hyprland with the scaling option set to 1.66666667 to match actual screen sizes throughout my setup.
This is my monitor setup:

monitor=HDMI-A-1, highres@highrr, 0x640, 1, transform, 3
monitor=DP-2, highres@highrr, 1080x0, 1
monitor=DP-3, highres@highrr, 1080x1080, 1.66666667, vrr, 1

I am experiencing similar issues as described in the original posting.
I have used the config settings as described in the docs.

With no scaling applied and in center mode, the mouse is moved to the center and from there on it works as expected.

With scaling and in center mode, most of the time, the menu is centered but the mouse is assumed to be somewhere to the top left of the opened menu.
Other times, the whole UI is not aligned to the monitor it is opened on, but to the focused window with center mode and scaling:
image

With no center mode, most of the time, the menu opens to the lower left of the screen:
image

image
here I had my pointer in the upper left corner of the terminal window using the hyprland dispatcher movecursortocorner, 3. The menu opened on the monitor (which has no scaling) above the 4k monitor (with scaling applied).

@Schneegans
Copy link
Contributor

@Shoxx98 Thanks for adding the details. However, this issue is about GNOME not Hyprland. I am pretty sure that this is something different. For Hyprland, we have #347 which may be related.

If you have a little coding experience, you could try to debug this on your end. The relevant code for figuring out the window size and position is about here: https://github.com/kando-menu/kando/blob/main/src/main/app.ts#L461. If you put in there some console.log("...") calls to print some of the variables, you could maybe get an idea of what is wrong here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GNOME This affects GNOME only Linux This affects Kando on Linux
Projects
None yet
Development

No branches or pull requests

3 participants