Use new Platform::IsX11

This commit is contained in:
Ilya Fedin 2021-02-24 20:45:15 +04:00 committed by John Preston
parent 28c918a36a
commit 9b88f816d6
2 changed files with 3 additions and 3 deletions

View file

@ -139,7 +139,7 @@ bool XCBSkipTaskbar(QWindow *window, bool set) {
bool SkipTaskbar(QWindow *window, bool set) { bool SkipTaskbar(QWindow *window, bool set) {
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION #ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
if (!IsWayland()) { if (IsX11()) {
return XCBSkipTaskbar(window, set); return XCBSkipTaskbar(window, set);
} }
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION

View file

@ -132,7 +132,7 @@ void PortalAutostart(bool start, bool silent = false) {
const auto parentWindowId = [&] { const auto parentWindowId = [&] {
if (const auto activeWindow = Core::App().activeWindow()) { if (const auto activeWindow = Core::App().activeWindow()) {
if (!IsWayland()) { if (IsX11()) {
return qsl("x11:%1").arg(QString::number( return qsl("x11:%1").arg(QString::number(
activeWindow->widget().get()->windowHandle()->winId(), activeWindow->widget().get()->windowHandle()->winId(),
16)); 16));
@ -579,7 +579,7 @@ bool TrayIconSupported() {
bool SkipTaskbarSupported() { bool SkipTaskbarSupported() {
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION #ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
return !IsWayland() return IsX11()
&& base::Platform::XCB::IsSupportedByWM("_NET_WM_STATE_SKIP_TASKBAR"); && base::Platform::XCB::IsSupportedByWM("_NET_WM_STATE_SKIP_TASKBAR");
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION #endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION