Bug 466119 - Using (-) values for windows position makes the window disapear
Summary: Using (-) values for windows position makes the window disapear
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: core (other bugs)
Version First Reported In: 5.27.0
Platform: NixOS Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-20 03:33 UTC by Mend
Modified: 2026-05-01 23:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mend 2023-02-20 03:33:35 UTC
When attempting to use negative values for window position under 'Configure Special Window Settings' cause the window to turn invisible and it's position is moved nowhere near it is suppose to be. I can tell because I use this for my virtual machine and the position where my mouse is captured makes no sense what-so-ever.

STEPS TO REPRODUCE
1. Select a window
2. Alt+F3
3. More Actions>Configure Special Window Settings
4. Add Property(bottm left + button)
5. Position
6. Use the Force option and use a negative value for x or y.
7. Apply and the window will disapear from view.

OBSERVED RESULT
Window disapears and moves in completely unexpected way.

EXPECTED RESULT
For it to move a negative amount of pixels off my screen.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: NixOS
(available in About System)
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Comment 1 Mend 2023-02-20 03:38:06 UTC
Using the 'Apply Initially' option(for position) seems to sometimes work for the positive value but the negative value isn't recognized.
Comment 2 Vlad Zahorodnii 2023-02-20 09:05:02 UTC
What's the usecase for putting windows offscreen?
Comment 3 Bug Janitor Service 2023-02-20 09:09:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/3633
Comment 4 Mend 2023-02-20 09:48:40 UTC
(In reply to Vlad Zahorodnii from comment #2)
> What's the usecase for putting windows offscreen?

I like to have a 16:9 section of my Ultrawide sectioned off for my virtual machine. Using VMM there are headers and a toolbar at the top of the window. So in order to have a full screen like experiance I need to move it partially off screen(so the top bars are not shown anymore) and prefer to do that once I open my VM. Currently now I have to manually drag it every time I open it. I mainly do this for my Astrology work/readings as none of my software runs on Linux.

https://imgur.com/a/sC0CuTS
Comment 5 Mend 2023-02-20 12:18:04 UTC
(In reply to Bug Janitor Service from comment #3)
> A possibly relevant merge request was started @
> https://invent.kde.org/plasma/kwin/-/merge_requests/3633

I don't believe so. This is happening under x11(I haven't tried under Wayland). This is supposed to be a wayland fix.
Comment 6 Bug Janitor Service 2026-04-29 21:00:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/9156
Comment 7 Zamundaaa 2026-05-01 21:50:05 UTC
Git commit 2f8a86034baeb9c238fbf20f772b23cac659e073 by Xaver Hugl.
Committed on 01/05/2026 at 10:43.
Pushed by zamundaaa into branch 'master'.

rules: make checkGeometrySafe actually safe

If the window rule's position was outside of every screen, it before returned
a rectangle that's at INT_MIN, causing the window to disappear and even
triggering asserts when that geometry was used in some calculations.

M  +7    -6    src/rules.cpp
M  +1    -2    src/rules.h
M  +3    -3    src/x11window.cpp
M  +7    -5    src/xdgshellwindow.cpp
M  +1    -1    src/xdgshellwindow.h

https://invent.kde.org/plasma/kwin/-/commit/2f8a86034baeb9c238fbf20f772b23cac659e073
Comment 8 Zamundaaa 2026-05-01 23:28:05 UTC
Git commit f0c8aabceed528a56ece0b579e32f50a19d379cb by Xaver Hugl.
Committed on 01/05/2026 at 22:37.
Pushed by zamundaaa into branch 'Plasma/6.6'.

rules: make checkGeometrySafe actually safe

If the window rule's position was outside of every screen, it before returned
a rectangle that's at INT_MIN, causing the window to disappear and even
triggering asserts when that geometry was used in some calculations.


(cherry picked from commit 2f8a86034baeb9c238fbf20f772b23cac659e073)

Co-authored-by: Xaver Hugl <xaver.hugl@kde.org>

M  +7    -6    src/rules.cpp
M  +1    -2    src/rules.h
M  +3    -3    src/x11window.cpp
M  +7    -5    src/xdgshellwindow.cpp
M  +1    -1    src/xdgshellwindow.h

https://invent.kde.org/plasma/kwin/-/commit/f0c8aabceed528a56ece0b579e32f50a19d379cb