Skip to content

fix: support 'xrandr --panning' - #8963

Merged
nbolton merged 3 commits into
deskflow:masterfrom
winex:winex-on-v1.24.0
Sep 23, 2025
Merged

fix: support 'xrandr --panning'#8963
nbolton merged 3 commits into
deskflow:masterfrom
winex:winex-on-v1.24.0

Conversation

@winex

@winex winex commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

hey guys! thanks for the nice software, here's my 2 cents...

i've been testing this for a week+ already - works great, just recompiled against v1.24.0 - no issues
would love to hear if this also works for real xinerama user (not xrandr!) user: multi-gpu, different screens, very complex config ;p

please review

@winex

winex commented Sep 17, 2025

Copy link
Copy Markdown
Contributor Author

oh, and FYI, #8867 breaks stuff: #8867 (comment)

@sithlord48

Copy link
Copy Markdown
Member

I do not really have a way to test this... @nbolton can you test this ?

@winex

winex commented Sep 17, 2025

Copy link
Copy Markdown
Contributor Author

FYI: logging breakdown by this PR with --debug DEBUG

client:

[2025-09-17T18:58:19] INFO: using legacy x windows screen
[2025-09-17T18:58:19] DEBUG: xinerama screen: 0 origin: 1920,0 size: 1920x1080
[2025-09-17T18:58:19] DEBUG: xinerama screen: 1 origin: 0,0 size: 3840x1080
[2025-09-17T18:58:19] DEBUG: center: 1920,540
...
[2025-09-17T18:58:20] DEBUG: screen shape: 0,0 3840x1080 (xinerama)

2 FullHD outputs, left one (monitor) is overlapping right one (TV) and can pan onto it to check what's there

server:

[2025-09-17T18:57:51] INFO: using legacy x windows screen           
[2025-09-17T18:57:51] DEBUG: xinerama screen: 0 origin: 0,0 size: 2560x1440                                                                                 
[2025-09-17T18:57:51] DEBUG: xinerama screen: 1 origin: 0,0 size: 2560x1920                                                                                 
[2025-09-17T18:57:51] DEBUG: center: 1280,960                                                                                                               
...
[2025-09-17T18:57:51] DEBUG: screen shape: 0,0 2560x1440 (xinerama)

center is a bit wrong on server - i enlarged one output to Y:1920 (by --scale 1.6) just for tests (and mouse can't move there!), but it's not a big issue. screen shape(last line) is correct, FB is x1440:

$  xrandr
Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 16384 x 16384
HDMI-2 connected 2560x1920+0+0 (normal left inverted right x axis y axis) 408mm x 306mm
   1600x1200     59.81*+
DVI-I-1-0 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95*+

maybe another PR in future: needs some XRandr checks probably, or root window. but i doubt there are many users with such weird config

p.s.: it's called X11 Window System, not XWindows, lol

@sithlord48

sithlord48 commented Sep 17, 2025

Copy link
Copy Markdown
Member

p.s.: it's called X11 Window System, not XWindows, lol

Not that this has anything todo with the pr, but It's name is the X Window System or X and the version of the protocol in use is 11 so its often referred to as X11.

@sithlord48

Copy link
Copy Markdown
Member

When you are ready for this to be reviewed please un draft .

@sithlord48
sithlord48 requested review from nbolton and sithlord48 and removed request for sithlord48 September 17, 2025 23:13
@sithlord48

Copy link
Copy Markdown
Member

This needs to be rebased on the master branch please do that also .

@winex

winex commented Sep 18, 2025

Copy link
Copy Markdown
Contributor Author

CI wanted 4 lines instead of a single one - rebased again and applied patch

marking as ready

this allows screens to overlap, use panning, etc
…ving screen

panned screens still needs `xtestIsXineramaUnaware` option enabled. this change
forcefully uses XTest only when leaving
useful examples:
* double 1 FullHD screen (main output) by:
	`xrandr --fb 3840x1080 --output DP-1 --panning 3840x1080+0+0/3840x1000+0+80`,
	leaving top 80 pixels for moving mouse out without actual panning
* dedicate right half of framebuffer to FullHD TV (second output):
	`xrandr --fb 3840x1080 --output HDMI-0 --panning 1920x1080+1920+0`
@winex

winex commented Sep 18, 2025

Copy link
Copy Markdown
Contributor Author

oops, rebased correctly

@winex
winex marked this pull request as ready for review September 18, 2025 12:00
@sithlord48

Copy link
Copy Markdown
Member

I can test to make sure this does not break my normal X session but i do not have a setup w/ panning to test that.

Comment thread src/lib/platform/XWindowsScreen.cpp
@winex

winex commented Sep 18, 2025

Copy link
Copy Markdown
Contributor Author

I can test to make sure this does not break my normal X session but i do not have a setup w/ panning to test that.

you mean server side session?
it's easy to test just by enlarging --fb ..., and specifying --panning WxH+x+y. i've provided examples in commit comments, but here is one more (for a single FullHD monitor):
$ xrandr --fb 3840x1080 --output HDMI-1 --panning 3840x1080+0+0

@sithlord48 sithlord48 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Kde X11 session as both client and host seams to at least not break "normal" use

@nbolton nbolton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look reasonable. I'd love to test, but I'm a bit short on time right now.

@nbolton
nbolton merged commit 9f8c45b into deskflow:master Sep 23, 2025
82 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants