Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

monitor scaling breaks focus on multi-screen setups

Open fdev31 opened this issue 2 years ago • 11 comments

Hyprland Version

Hyprland, built from branch main at commit f49af187bc0755f9b5be9376bfd52c0cf12c1e11 dirty (Xdg config home support (2047)). Tag: v0.26.0-96-gf49af187

Bug or Regression?

Bug

Description

Using such configuration:

monitor=,preferred,auto,1
monitor=eDP-1,preferred,auto,1.2

If I place a monitor on the right, or bottom of eDP-1 the mouse or most keyboard shortcuts can't reach it.

Monitors sizes & positions look fine.

If I change 1.2 to 1 the problem is gone.

How to reproduce

  • use scaling for every monitor (eg: monitor=,preferred,auto,1.1)
  • try to change focus via mouse or keyboard

The mouse is stuck on the current screen, only way to switch is via keyboard shortcuts such as focusmonitor (not movefocus - which is also broken)

EDIT: if I insist a lot trying to switch with the mouse, it may eventually work after few seconds trying...

Crash reports, logs, images, videos

No response

fdev31 avatar Jul 31 '23 18:07 fdev31

Please upgrade your version to the latest version and check again (install git version or build from source) https://wiki.hyprland.org/Getting-Started/Installation/.

romanstingler avatar Jul 31 '23 20:07 romanstingler

I don't see any difference / improvement.

fdev31 avatar Aug 01 '23 16:08 fdev31

Actually I'm thinking, this can be useful in some scenarios, to have the mouse / focus locked on the current monitor. Do you think it would make sense to have this has a feature request? something we could toggle as needed.

fdev31 avatar Aug 01 '23 16:08 fdev31

set proper absolute positions (not auto) and try again. IIRC it's an issue with auto

vaxerski avatar Aug 01 '23 19:08 vaxerski

I am using dynamic layouts depending on which other screen I plug. Even if I set positions later with wlr-randr the issue is the same. In short I can't use static positions for my monitors.

For testing purposes I did check the behavior with a fixed position, and the behavior is exactly the same.

fdev31 avatar Aug 01 '23 20:08 fdev31

what is the output of hyprctl monitors?

romanstingler avatar Aug 01 '23 20:08 romanstingler

For instance:

Monitor eDP-1 (ID 0):
	[email protected] at 0x0
	description: BOE 0x0A81 (eDP-1)
	make: BOE
	model: 0x0A81
	serial: 
	active workspace: 3 (3)
	special workspace: 0 ()
	reserved: 0 50 0 0
	scale: 1.20
	transform: 0
	focused: yes
	dpmsStatus: 1
	vrr: 0

Monitor HDMI-A-1 (ID 1):
	[email protected] at 0x1080
	description: BNQ BenQ PJ 0x01010101 (HDMI-A-1)
	make: BNQ
	model: BenQ PJ
	serial: 0x01010101
	active workspace: 2 (2)
	special workspace: 0 ()
	reserved: 0 50 0 0
	scale: 1.00
	transform: 0
	focused: no
	dpmsStatus: 1
	vrr: 0


fdev31 avatar Aug 01 '23 20:08 fdev31

what happens if you for testing purposes try

monitor=eDP-1,preferred,auto,1.2
monitor=HDMI-A-1,preferred,0x900,1

romanstingler avatar Aug 01 '23 20:08 romanstingler

You nailed it, the scaling factor seems to be missing somewhere and with this it behaves as expected.

Fun fact: restoring the old values just keeps the correct behavior

fdev31 avatar Aug 01 '23 21:08 fdev31

yeah I was just guessing because I have 4k and 1.5 scaling on one screen and also have auto on the other (dynamic screens) and the second one was positioned at 2560x0 (I have them horizontally)

@vaxerski Perhaps this can assist you in identifying the source of the error.

romanstingler avatar Aug 01 '23 21:08 romanstingler

is this stilla thing?

vaxerski avatar May 15 '24 23:05 vaxerski

is this stilla thing?

I'm pretty sure scaling works as expected in multi monitor now. I recall performing some tests with success.

fdev31 avatar May 28 '24 15:05 fdev31

@vaxerski yes it works, I use multi monitors one scaled every day, no issues

romanstingler avatar May 28 '24 16:05 romanstingler