Bug 421892 - [kcm/kwinrules X11] KWinRules KCM: Redesign Fallout: Position rule caps to 4098
Summary: [kcm/kwinrules X11] KWinRules KCM: Redesign Fallout: Position rule caps to 4098
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: rules (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-22 02:04 UTC by Duncan
Modified: 2020-05-22 14:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.19
Sentry Crash Report:


Attachments
Patch maximum position to 65535 (871 bytes, text/plain)
2020-05-22 03:46 UTC, Duncan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2020-05-22 02:04:39 UTC
+++ This bug was initially created as a clone of Bug #421055 +++
Yet another window rules kcm redesign bug...

Setting a position rule to >4098 (at least X coordinate) is impossible via the new GUI. =:^(

Scenario:

* Dual 4K TVs as monitors in side-by-side orientation, giving me a framebuffer width of 3840*2=7680.

* Most of my main work windows are standardized to 1280x1080, thus allowing me to fit a grid of 3x6 windows on my main work monitor, which happens to be the one to the right (with the one on the left often playing a full-screen video).

* That means the right-most grid slot's X coordinate is 6400 (for a 1280-width range of 6400-7679).

* I like to keep a ksysguard window (RIP superkaramba, unfortunately) in the top-left grid-slot, and I have a window rule to force that position, 6400,0.

* I just had occasion to edit that ksysguard window ruleset for some other reason, and found kwin forcing it to X=4098 after that.  Opening the ruleset I found that the position had been changed to 4098,0, and that while I could reduce that number I couldn't increase it back to the 6400 it should be -- the GUI refused to let me set anything above 4098, either with the spinner or typing it in, or rather, I could type it in, but the window was moved to 4098 and that's what was saved in kwinrulesrc upon upon hitting apply, despite the thing saying 6400 as I actually hit that apply!

* Manually textediting the kwinrulesrc file and running a kwin_x11 --replace allowed me to reset the 6400 position that was supposed to be there, but opening up that ruleset in the kcm to check it, it wanted to reset 4098 again.

Obviously a 4098 cap on position value simply isn't sufficient, especially with 8K displays out (if still prohibitively expensive but hopefully they'll be more reasonable in a couple years) and the possibility of someone running multiple of /those/.  I'd say 16K minimum, if not maxint.
Comment 1 Duncan 2020-05-22 03:46:49 UTC
Created attachment 128681 [details]
Patch maximum position to 65535

[Hmm... bugzi's a bit dated and still says phabricator for patches... Maybe I should file a bug on that too?]

Easy enough to grep 4098 and generate a patch even if I'm a gentooer not a dev...

65535 should be enough for awhile... not yet tested, tho.
Comment 2 Duncan 2020-05-22 04:52:13 UTC
(In reply to Duncan from comment #1)
> Created attachment 128681 [details]
> Patch maximum position to 65535

> 65535 should be enough for awhile... not yet tested, tho.

Tested (to 6500 at least, I can still see that on-screen, and 65535 doesn't appear to break anything, tho the current kcmutils bug had me worried for a moment) now.  Works. =:^)

(I had rebuilt kcmutils in the same update and HEAD's buggy ATM.  Couldn't find /any/ kcms and I thought my 65535 patch here broke it for a moment.  HEAD-1 got it back tho so I could test this.  Now to file the kcmutils bug if nobody's ahead of me...)
Comment 3 Ismael Asensio 2020-05-22 14:34:06 UTC
Git commit 91eee99fca6979b598cbd9f52bec58a9e48fcf69 by Ismael Asensio.
Committed on 22/05/2020 at 14:03.
Pushed by iasensio into branch 'Plasma/5.19'.

[kcm/kwinrules] Extend upper limit of position and size spinners

Currently, the spinners used to edit position and size rules have an upper
limit of 4098, which may be not enough for wide/hdpi/mutiple screens.

The property itself has no such limit in the `.kcfg` schema
This is just an issue with the editor.
FIXED-IN: 5.19

M  +2    -2    kcmkwin/kwinrules/package/contents/ui/ValueEditor.qml

https://invent.kde.org/plasma/kwin/commit/91eee99fca6979b598cbd9f52bec58a9e48fcf69