The two ways of disabling session management have the same impact on the
session being saved, but there is one behavioural side-effect that
turned out to be less ideal.
By disabling completely we don't follow the session manager telling the
application to quit. That's not something needed with the systemd boot,
but for the legacy boot effectively we were just closing applications by
ripping the X connection away from under them.
Some applications are bad at handling this and this led to a bunch of
crashes or dangling processes at logout.
This reverts commit 9be7dedb87.
CCBUG: 424408
We do this sometimes, but not consistenly.
The benefit is twofold.
First it improves the diff when adding new values since no existing line needs to be touched.
Second it prevents clang-format from collapsing the definition into a single line, which is undesired for large enums.
Plasma core is moved away from being a template. This makes it easier
for others to mark themselves as being after. A new readme is added to
explain the design.
This means on logout we'll be gracefully closed down.
All of these are closing down properly anyway, but this makes things a
bit more explicit in case you managed to log out at an awkward point.
Summary:
This brings numerous advantages such as:
- easier admin configuration with drop-ins, overrides and multiple
hooks throughout (and only having to learn one tool)
- session cleanup on exit, avoiding that occasional part where shutdown
hangs
- startup that actually knows when things are up
- race free autostart and DBus activation at once
- logs that rotate are split by service and usable
- resource management through slices and cgroups (the part I want)
Over the past 2 years I've been trying to tidy up and encapsulate the
relevant parts of startup into the binary plasma-session so that we can
just runtime swap out that one part and supporting both paths will be
easy.
Support is toggleable via cmake flag, as it seems like it should be a
distro decision, especially as we will require a specific systemd with
the xdg-generator.
KDED/kwin/other services are attached to the relevant repo.
Task T11914
Differential Revision: https://phabricator.kde.org/D28305
squash
Summary:
For each tray icon XEmbedSNIProxy is creating container window 32x32 in size. It is black with opaque set to 0 (fully transparent when compositor is enabled). All of these container windows are stacked below all windows, so normally you can't see them. On creation all container windows are created in top-left corner. When user clicks on the tray icon, container window is moved to the click location (to handle events correctly).
On KWin restart all windows are shuffled, usually KWin is able to restore ordering correctly, but for some reason not it this case. As a result black/transparent container windows are stacked above all other windows and panels.
To solve that, when container window is visible, XembedSNIProxy needs hide it again by stacking the container window below again.
BUG: 357443
FIXED-IN: 5.18.0
Test Plan:
1. Run any application with XEmbed system tray icon, do not click on the icon
2. Restart KWin
3. [Optional] Disable compositor - with disable container window is black and easier to spot
4. Expected:
a) before fix: black/transparent rectangle in the top-left corner, reacts to mouse click
b) after fix: no rectangle, mouse clicks work as expected.
Reviewers: #plasma_workspaces, #plasma, davidedmundson
Reviewed By: #plasma_workspaces, #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26395
Summary:
Regression introduced in previous commit, review D25777. Tray icons should have an ability to resize. If not, icons smaller than 32x32 will render incorectly. In addition, do not notify using xcb_configure_notify_event_t, in some cases (Wine) it messes up the event handling.
BUG: 414667
FIXED-IN: 5.18.0
Test Plan: Tested with keepass2, keepassx, pidgin, xchat, hexchat, tuxguitar, liferea, wine tflash.exe, workrave, stardict
Reviewers: #plasma_workspaces, #plasma, davidedmundson
Reviewed By: #plasma_workspaces, #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26088
Summary:
When the window is embedded, it should not request position change. Sometimes applications are misbehaving and ignore this constrain. We need to capture all structure requests (position or size change) and ignore them. In other words, we must be a window manager for the embedded window.
BUG: 414667
Test Plan:
0. You need multiples screens to test this
1. Configure screens so that (0,0) is not on the primary screen
2. Run any Windows app with tray icon using Wine
3. Left click event should work correctly
Reviewers: #plasma_workspaces, #plasma, davidedmundson
Reviewed By: #plasma_workspaces, #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26079
Summary:
For each tray icon XEmbedSNIProxy is creating container window 32x32 in size. It is black with opaque set to 0 (fully transparent when compositor is enabled). All of these container windows are stacked below all windows, so normally you can't see them. On creation all container windows are created in top-left corner. When user clicks on the tray icon, container window is moved to the click location (to handle events correctly).
On KWin restart all windows are shuffled, usually KWin is able to restore ordering correctly, but for some reason not it this case. As a result black/transparent container windows are stacked above all other windows and panels.
To solve that, on KWin restart, XembedSNIProxy needs to iterate over all known container windows and stack them below again.
BUG: 357443
Test Plan:
1. [Optional] Disable compositor - with disable container window is black and easier to spot
2. Run any application with XEmbed system tray icon, do not click on the icon
3. Restart KWin
a) Before: black/transparent rectangle in the top-left corner, reacts to mouse click
b) After: no rectangle, mouse clicks work as expected
Reviewers: #plasma_workspaces, #plasma, davidedmundson
Reviewed By: #plasma_workspaces, #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D25603
Summary:
If available, always use 32-bit color. We don't need Composite extension to handle transparency - all client windows are our children and transparency in handled in QML, inside the panel (so no need to composite real windows).
BUG: 356937
FIXED-IN: 5.17.1
Test Plan:
Disable compositor, run:
- pidgin (make sure pidgin-libnotify is NOT installed)
- keepassx
- xchat
- liferea
Before changes: black backgroud
After changes: transparent background
Reviewers: davidedmundson, #plasma_workspaces, #plasma
Reviewed By: davidedmundson, #plasma_workspaces, #plasma
Subscribers: mlaurent, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24530
Summary:
If available, always use 32-bit color. We don't need Composite extension to handle transparency - all client windows are our children and transparency in handled in QML, inside the panel (so no need to composite real windows).
BUG: 356937
FIXED-IN: 5.17.1
Test Plan:
Disable compositor, run:
- pidgin (make sure pidgin-libnotify is NOT installed)
- keepassx
- xchat
- liferea
Before changes: black backgroud
After changes: transparent background
Reviewers: davidedmundson, #plasma_workspaces, #plasma
Reviewed By: davidedmundson, #plasma_workspaces, #plasma
Subscribers: mlaurent, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24530
Summary:
XCB may return null pointer as a response. Add a check to prevent
segmentation fault.
BUG: 409652
FIXED-IN: 5.17.1
Test Plan: It is hard to reproduce, but the reason of the segmentation fault is pretty obvious, thanks to the debug dump from bug 409652
Reviewers: #plasma_workspaces, #plasma, davidedmundson
Reviewed By: #plasma_workspaces, #plasma, davidedmundson
Subscribers: ngraham, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24514
Summary:
Do not scale up small icons to avoid quality detoriation. For small icons scaling should be done in SystemTray only. Currently XembedSNIProxy scales to 32x32, then SystemTray (usually) scales it down to 24x24.
BUG: 366047
FIXED-IN: 5.17.1
Test Plan:
I've run few applications with small icons:
- keepassx (22x22)
- liferea (16x16)
- tuxguitar (16x16)
It looks much better without scaling in xemebdsniproxy.
Reviewers: davidedmundson, #plasma, #plasma_workspaces
Reviewed By: davidedmundson, #plasma, #plasma_workspaces
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24531
Summary:
If needed, perform resize in each update().
Client window may be too big, it must be resized to a certain reasonable size. Sometimes resizing in the constructor is not enough because it is too early and the client window is not fully initialized. Even if client window is resized, on first update it reverts back to original size (or just ignores the first request - some kind of a race condition).
In addition, I applied some rules from: https://community.kde.org/Policies/Kdelibs_Coding_Style
BUG: 358240
Test Plan:
I tested it using keepass2, now it shows better results (still not perfect). Window is resized to 32x32, but icon is only 24x24 it top-left. Better than 273x273 with tiny dot in the corner. This is a workaround for unsolvable bug in Mono - AFAIK Windows Forms are not longer maintained so it won't be fixed.
I tested this change with several other apps for regressions, no issues:
pidgin
liferea
hexchat
tuxguitar
xchat
keepassx
stardict
and other I don't remember now. No regressions.
Reviewers: davidedmundson, #plasma, #plasma_workspaces, broulik
Reviewed By: davidedmundson, #plasma, #plasma_workspaces
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D24529
Summary:
Wine is using XWindow Shape Extension for transparent tray icons.
We need to find first clickable point starting from top-left.
BUG: 399234
Test Plan:
Bug fix test:
1. Enable KWin compositing;
2. Download this test program (SHA-1: 63ae606aee64259091e7f82436d4ecdf3a6e9047): https://www.nirsoft.net/utils/tflash210.zip
3. Run the .exe with Wine **Staging**
4. Right click on the icon
5. Context menu should show
Regression test:
1. Run XChat
2. Right click
3. Context menu should show in the same place as without patch
Reviewers: davidedmundson, #plasma_workspaces
Reviewed By: davidedmundson, #plasma_workspaces
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D22767