Summary:
KWorkSpace::detectPlatform among others use that, so make sure it's set.
On 5.12 it has export QT_QPA_PLATFORM=wayland already, so it's not necessary (?).
Test Plan: I had that patch applied locally for basically ever, works fine.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D18233
Summary:
Qt and GTK based applications have switched to using fontconfig for fonts
exclusively, so this code is mostly unused.
As for the remaining legacy X11 applications:
- mkfontdir only supports bitmap (e.g. PCF, BDF) fonts. For e.g.
truetype fonts, a mkfontscale call would be required. Lack of complaints
hints this is not used at all.
- the system dirs (sys_odir, sys_fdir) use KDEDIR(S), which is deprecated.
The dirs do not exist, thus the fontpath is unchanged.
- system dirs are typically allready included in the XServer font path
TLDR: (scalable) fonts in user dirs are not picked up due to missing
mkfontscale calls, and system dirs are already included.
This removes the dependency on xset and mkfontdir. The latter is important,
as e.g. on openSUSE the availability of mkfontdir triggers costly, extra
setup steps for X Core fonts on package installation.
Reviewers: #plasma, fvogt, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16530
Summary:
kcminit had a slot to start processing something and a signal to emit
when it's finished.
For DBus that's quite bad practice as it can leave you hanging in the
case of a kcminit crashing. It's better to use the return of the
original call to signal when something is done.
From ksmserver we can then just use DBus timeouts set on the interface
than a secondary timer.
We also remove a pointless blocking call to kcminit introspecting
everything, if kcminit is not running it will return with an error
immediately which is no slower than checking first if it's not running
and faster if it is.
Test Plan:
Logged in
Session logs showed kcminit ran
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: zzag, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16587
Summary:
kcheckrunning is only used by startkde, it shouldn't be in the ksmserver
folder.
No code or behavioural changes, just tidying.
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15202
Summary:
As discussed the env variables are no longer exported. Thus Qt
applications follow the default qpa platform they are compiled with and
thus still function if they are packaged with a Qt without QtWayland.
Plasma's internal processes pick the qpa platform depending on the
session type as well as our flatpak apps.
KRunner and Plasmashell are adjusted to not leak the env variable they
set for themselves.
Test Plan:
Started a wayland session, verified with KWin's debug console
that plasmashell and krunner are wayland. Launched kwrite from both plasma
and krunner and verified that it's xcb
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D11447
Summary:
This is a preparation step to unset QT_QPA_PLATFORM from the wayland
startup session script. Setting QT_QPA_PLATFORM breaks 3rd-party Qt
software which does not bundle QtWayland. Most prominent example is
the Qt installer itself (see
https://bugreports.qt.io/browse/QTBUG-60222).
On the other hand our Plasma workspace applications need to be forced to
Wayland on a Wayland system. So we have a conflict between we want to
set QT_QPA_PLATFORM and we don't want to set QT_QPA_PLATFORM.
This change adds new API to KWorkspace to address this problem. The new
method adjusts the QT_QPA_PLATFORM based on the XDG_SESSION_TYPE
enviornment variable. It is completely opt-in. Meaning applications need
to explicitly add the call prior to creating the QGuiApplication and if
the user specifies either QT_QPA_PLATFORM env variable or any of the
-platform command line argument variants, the platform detection is
skipped.
The change also adjusts all plasma-workspace applications which should
use Wayland on Wayland to use the new API. The startup script on the
other hand still sets QT_QPA_PLATFORM. We also have applications outside
of plasma-workspace which needs this detection. Examples are:
* powerdevil
* systemsettings
* kinfocenter
Once this change is merged those applications can be adjusted by linking
against PW::KWorkspace and afterwards QT_QPA_PLATFORM can be unset from
startplasmacompositor.
Test Plan: See added autotest
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10816
Summary:
Consistent usage of install variables avoids mismatches for people who
make use of custom settings of install paths.
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10400
Summary:
Consistent usage of install variables avoids mismatches for people who
make use of custom settings of install paths.
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D10400
This reverts commit aba3d48c07.
It causes issues for multiple GTK apps when fractional factors are used.
Given GDK already has it's own auto scaling, this seems to cause more problems
than it solves in its current form.
BUG: 389523
Summary:
Qtpaths doesn't work on some distros (Ubuntu for example, where it's
shipped with dev tools) and it's quite a slow way to effectively just read
an environment variable.
This is a rework of d90c63ac8f that
also correctly includes system directories.
Test Plan:
Put shell script in ~/.config/plasma-workspace/env
put shell script /etc/xdg/plasma-workspace/env
Rebooted. Confirmed both were run
Checked earlier 'if' statement works manually in bash.
Reviewers: #plasma
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9478
Summary:
Xwayland is only available within startplasma, so only call xprop in
startplasma.
Additionally, the environment isn't complete within startplasmacompositor,
as $DISPLAY needs to be exported to the activation environment as well.
BUG: 377122
Test Plan: pinentry-qt works now when started from gpg-agent.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: graesslin, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9597
Summary:
kwin_wayland will then use those values to set the default keyboard layout
accordingly.
BUG: 388249
Test Plan:
Ran startplasmacompositor, keyboard layout now set correctly and env
shows all XKB_DEFAULT_* variables set.
Reviewers: #plasma, graesslin
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9512
Summary:
We don't remotely support multihead in plasmashell.
Nor do we support two plasmashells running to fake it.
SDDM doesn't either.
Kwin has some code, but we don't check the screen before
choosing the DBus service to use. I doubt it works well.
This kills some code, and a blocking call to klauncher.
(Note, multihead has nothing to do with xrandr spanning screens)
Test Plan:
Code grep
Compiles
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9171
Summary: We are just looking for files in .config and we already know where that is
Test Plan: Added a script and it defined things.
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9134
The reason why this was added is not valid anymore now that we set the QQC2 style in C++. Setting it causes crashes in QGuiApplications
that need to be worked around with an ugly hack in plasma-integration.
Differential Revision: https://phabricator.kde.org/D7998
Summary: As now it is set by our QPT
Reviewers: #plasma, gladhorn
Reviewed By: #plasma, gladhorn
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7936
Summary:
On X our font DPI is used in addition to the scaling.
i.e I want scale 2 and font DPI at 192 (96*2)
On Wayland it's the opposite. The font is scaled *with* the output
scaling. So I want it at 96 (or unset)
Using the same settings makes swithing to and from X and wayland hard,
and also makes the first Wayland run suck.
There are potentially some users who want it 110 at both, so we do still
need the option (so this isn't a perfect solution)
Can we just divide it? Not really as we don't know what scale the user
will be using and it might not just be one value.
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7830
Summary:
Scale factor is sent on the output, we don't need to have the hacky env
variables.
When the kscreen KCM is used on wayland it doesn't set the variable this
is using.
Test Plan:
Configured an X session to have high DPI with this variable.
Logged into a wayland session, ran env.
(font DPI is still a problem, if it gets set on X
it's visually doubled on my wayland session. )
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7781
Summary:
Setting the style manually is necessary as there is only a variable that
applies to both quick controls versions, so it needs to be overwritten to not
cause a warning on every application start. The current way of setting it directly
got defeated by ugly bugs in QQuickControlSettings1, which need to be worked around.
See the added comments for an explanation.
Test Plan:
Set the variables manually, now works consistently everywhere without showing warnings.
For some reason I feel much dirtier now.
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7381
Summary:
It does explicitly what the comment above the export implies.
That way this warning on every use of Quick Controls 1 is gone:
WARNING: Cannot find style "org.kde.desktop" - fallback: "/usr/lib64/qt5/qml/QtQuick/Controls/Styles/Desktop"
Note that I'm not 100% sure that this does not have any
ill side effects as I don't quite understand what and where
org.kde.desktop is supposed to be.
Test Plan:
Started plasmashell and plasma-discover both with and without
the change, no difference except that the warning is now gone.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7257
Summary:
Currently X and Xwayland (unless set otherwise) defaults to a DPI of 96.
GTK on wayland (unless set otherwise) defaults to a DPI of 96.
Qt (currently) defaults to physical size/resolution. This leads to
reports that Wayland looks big.
Qt is potentially also changing to 96 for > Qt5.10.
(it's in review at the time of writing)
Now kwin has proper scaling support, legacy apps get scaled by the
compositor without font hacks, and apps that scale themselves need a
non-scaled font DPI. (i.e a 4k screen at 2x still wants a DPI of 96 not
184).
We want to change the wayland scale factor not the font.
If a user does override this setting that override will still work.
BUG: 374978
Test Plan:
don't have this setting explcitly set
dolphin --platform wayland and dolphin --platform xcb have everything
the same size. Even on a scaled display where one is scaled up by the
compositor and one is native.
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7185
Summary:
KWindowSystem::platform() cannot be used before QApplication is
constructed.
QCoreApplication::setAttribute needs to be called before QApplication is
constructed.
We need a different method. I've used an explicit new env variable so
that some users can also opt in to use this when on X.
Test Plan:
Logged in.
Plasma panels all work. Look to be native resolution.
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D7200
Summary:
In Plasma we install a DBus activated service to handle the case of
notifications being sent before Plasma is loaded. This file clashes with
other notification daemons and causes distro issues.
The convention is to make this file name match the DBus service name so
that we can detect conflicts, however in this case we know we have an
unavoidable conflict, but it doesn't really have an repurcisions other
than the user having an undetermined notification daemon chosen during
plasma bootup (which was the case before this patch too)
Effectively it's the same problem we have with the
org.freedesktop.FileManager1 service and Dolphin, and the same solution.
Test Plan:
Installed this
kquitapp5 plasmashell
notify-send some message. Confirmed it waited
started plasmashell. Got the message
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5968
Summary:
Set the QtQuickControls style to our own: for QtQuickControls1
it will fall back to Desktop, while it will use our own org.kde.desktop
for QtQuickControlsStyle and Kirigami
Test Plan: systemsettings redesign uses qstyle qqc style, for both qqc1 and 2
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5720
Summary:
bc1324ceeb in startkde had a change
Don't try to set $qdbus to a path to qdbus... it wasn't used
conherently, without issue don't really need it
this wasn't synced with startplasma.
BUG: 374402
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3915
Summary:
Remove outdated parts of startkde that are no longer used
Remove setion about kwin_failsafe which isn't used
Remove code related to oxygen fonts that aren't used
Remove section about darwin
Get rid of check that dbus-server exists, it autostarts
Don't try to set $qdbus to a path to qdbus... it wasn't used
conherently, so we don't really need it
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2894
Summary:
The current code registers the session bus *after* app->exec() this
effectively means it won't work.
This causes ksmserver to be unable to deliver the calls to start kcminit
modules at remaining init phases.
Any KCMinit module which are at X-KDE-Init-Phase=1 or 2 will now get
run. It also means kcminit_startup closes, instead of lingersing on
startup doing nothing until it times out 5 minutes later.
Test Plan: Confirmed kcminit_startup now exits properly.
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2887
$qdbus is a full path to the qdbus binary, not relying on it being in
$PATH
It was completely unset in startplasma and startkde made a call to
ksplash using qdbus assuming it's in the path
Reviewed-by: David Edmundson