-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wayland taskbar support #2031
Closed
Closed
Wayland taskbar support #2031
Changes from 91 commits
Commits
Show all changes
92 commits
Select commit
Hold shift + click to select a range
5dc5d82
CMake: FindXCB components are upper case
gfgit 07f702a
CMake: update dependencies for Qt6
gfgit b4fe335
CMake: link to dbusmenu-lxqt instead of dbusmenu-qt6
gfgit 96a6dc6
Replace qAsConst() with std::as_const
gfgit bfcf78a
Replace QPair with std::pair
gfgit 61893fb
Replace QLatin1Literal with QLatin1String
gfgit fb5c5c8
QEvent: port pos() to position() and globalPos() to globalPosition()
gfgit d1c1ce8
Fix QWidget::enterEvent(QEnterEvent*) signature
gfgit 190280c
QLayou::setContentsMargin() instead of setMargin()
gfgit b8b33c6
QuickLaunchButton: fix ambiguous list initializer
gfgit 79c4a48
Port QRegExp with QRegularExpression TODO
gfgit cb2d7cb
QLocale territory() instead of country()
gfgit a955bb6
Qt6 always enables High-DPI Pixmaps
gfgit e37056f
PanelPluginsModel: Q_DECLARE_OPAQUE_POINTER()
gfgit b838c60
Use QColor::fromString()
gfgit 0600444
FIXME: LXQtTaskButton deprecated constructor
gfgit 741d2d7
Disable ColorPicker on Wayland
gfgit a0b3ce3
Fix KX11Extras, KWindowSystem includes
gfgit cbad679
Port QX11Info to QX11Application
gfgit 1ef5229
LXQtTaskButton: port to KX11Extras
gfgit 606a223
LXQtTaskButton: port away from QDesktopWidget
gfgit 27c93d8
QString::arg(...) use mult-arg version
gfgit 61a051d
LXQtCpuLoad: do not include <QtCore> directly
gfgit 70d580c
Configuration: fix call to temporary object
gfgit d0dcf66
QEyesConfigDialog: avoid allocating temporary container
gfgit 1f7a0fa
QEyesImageWidget: unneeded QString allocation
gfgit 96b98e0
LXQtQuickLaunch: fix QSet warning and better readability
gfgit 7d06f23
Port LXQtTrayPlugin to Qt6 TODO
gfgit e094680
LXQtTaskBar: fix include recursion
gfgit 2328de7
Port LXQtKbIndicatorPlugin to Qt6
gfgit b682f1e
Replace QScopedPointer with std::unique_ptr
gfgit 4343a79
Replace QVector with QList
gfgit 633b8a1
SNIProxy: use QBitmap::fromImage TODO
gfgit f0835c4
README: update mentioned dependencies
gfgit 4bdb243
TaskBar: forward declare
gfgit 1d5f0f8
TaskBar: new ILXQtTaskbarAbstractBackend
gfgit 3f913a2
ILXQtTaskbarAbstractBackend: add supportsAction() method
gfgit cd1f762
TaskBar: add X11 backend
gfgit 740639e
TaskBar: new LXQtTaskBarProxyModel
gfgit 47bba93
TaskBar: use backend in LXQtTaskBar
gfgit 43761a9
TaskBar: initial use of backend in LXQtTaskButton
gfgit 8dbc2e5
TaskBar: use backend for urgency hint
gfgit 1ac62fb
TaskBar: use backend to set window layer
gfgit 2411395
TaskBar: use backend to close and raise window
gfgit 6b3b0dd
TaskBar: use backend to roll up (shade) windows
gfgit 5462b2f
TaskBar: use backend to minimize window
gfgit e7c5a98
TaskBar: use backend to de-maximize window
gfgit 8297648
TaskBar: use backend to get window state
gfgit 8434907
TaskBar: use backend to set window state
gfgit 05bb41b
TaskBar: port workspace usage to backend
gfgit 161bf92
TaskBar: remove X11 specific includes in lxqttaskbutton.cpp
gfgit 504e461
TaskBar: remove X11 code from LXQtTaskBar and LXQtTaskGroup
gfgit f0630c8
TaskBar: LXQtTaskButton remove X11 specific code
gfgit 60f2b57
TaskBar: set context menu parent
gfgit 1bd36e0
LXQtPanel: rework calculatePopupWindowPos()
gfgit 068aa55
LXQtPanel: avoid QCursor::pos() usage
gfgit 6928050
ILXQtTaskbarAbstractBackend: new Geometry window property
gfgit 988dc73
Move ILXQtTaskbarAbstractBackend to panel directory
gfgit b87fe2d
ILXQtTaskbarAbstractBackend: new isAreaOverlapped() method
gfgit cc3fbe3
LXQtPanel: use less KX11Extras and more ILXQtTaskbarAbstractBackend
gfgit 4b7cfd5
ILXQtTaskbarAbstractBackend: add dummy implementation
gfgit 7730f59
LXQtMainMenu: indent header include
gfgit 974e481
SNIProxy: use Qt Private headers to get Xcb timestamp
gfgit d9b58f3
ILXQtTaskbarAbstractBackend: new showDesktop() function
gfgit a3e93e2
ShowDesktop: use ILXQtTaskbarAbstractBackend
gfgit 56aed45
DesktopSwitch: port to ILXQtTaskbarAbstractBackend
gfgit f0b0d1b
LXQtTaskbarConfiguration: port to ILXQtTaskBarAbstractBackend
gfgit c1b21d6
DesktopSwitchConfiguration: port to ILXQtTaskBarAbstractBackend TODO
gfgit ad3ee82
TaskBar: consider initial windows
gfgit 3a64a01
TaskBar: add experimental KWin Wayland backend
gfgit 575ba5d
LXQtTaskBarPlasmaWindowManagment: implement showDesktop()
gfgit 2fdeb89
LXQtTaskbarWaylandBackend: do not show transient windows
gfgit cc1befc
LXQtTaskBarPlasmaWindowManagment: fix destructor TODO
gfgit 6b206fd
LXQtPanel: basic virtual desktop support on Plasma Wayland
gfgit df9ec87
LXQtPanel: workaround KAcceleratorManager changing button text FIXME …
gfgit 8d1b956
LXQtPanel: use LayerShell on Wayland
gfgit 318ad81
LXQtPanel: fix position not applied immediatly on Wayland
gfgit 355b0db
LXQtPanel: partially fix alignment on Wayland TODO
gfgit 3f9bcb2
Add desktop file to be recognized by KWin Wayland
gfgit 5b54478
LXQtTaskbarWaylandBackend: return only accepted windows
gfgit 9d024fb
LXQtPanel: fix auto-hide on Wayland
gfgit e88c5b2
LXQtTaskbarWaylandBackend: fix workspace logic
gfgit a0c1cf8
LXQtTaskbarWaylandBackend: fix workspace removal logic
gfgit 30e96c2
lxqttaskbartypes.h: fix ShowOnAll desktops flag value
gfgit 90eb2df
LXQtTaskbarWaylandBackend: implement moving window to virtual desktop
gfgit f29cf3a
ColorPicker: use XDG Desktop Portal on Wayland TODO
gfgit fc398ba
LXQtPlasmaWaylandWorkspaceInfo: fix signedness comparison
gfgit f6e9ba9
CMake: move panel WM backends to separate libraries
gfgit 06a6eed
LXQtTaskbarWaylandBackend: fix QTime inclusion TODO
gfgit a24d88a
CI: LXQt2 test
redtide 7c4476e
Remove CI workaround
gfgit 794648c
LXQtPanel: set LayerShellQt KeyboardInteractivityOnDemand
gfgit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
set -ex | ||
|
||
#source shared-ci/prepare-archlinux.sh | ||
|
||
cat >> /etc/pacman.conf <<EOF | ||
[lxqt2wip] | ||
SigLevel = Optional TrustAll | ||
Server = https://archlive-aur.sourceforge.io/lxqt2wip/x86_64 | ||
EOF | ||
|
||
# Needed to allow updating archlinux-keyring package (see below). | ||
# This also enables usage of third-party keys [1]. | ||
pacman-key --init | ||
|
||
# Update the keyring first to allow installing packages signed by newer keys [2]. | ||
# This may be needed when `pacman -Syu` below or other pacman commands in individual LXQt | ||
# components uses packages signed by newer keys. | ||
pacman -Sy --noconfirm archlinux-keyring | ||
|
||
pacman -Syu --noconfirm | ||
|
||
# [1] https://gitlab.archlinux.org/archlinux/archlinux-docker/-/issues/18 | ||
# [2] https://github.com/lxqt/lxqt-panel/pull/1781#issuecomment-1111755255 | ||
|
||
# See *depends in https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=lxqt-panel-git | ||
packages=( | ||
alsa-lib | ||
cmake | ||
git | ||
libpulse | ||
libstatgrab | ||
libxcomposite | ||
libxtst | ||
lm_sensors | ||
menu-cache | ||
qt6-base | ||
qt6-tools | ||
# kwindowsystem | ||
# solid | ||
) | ||
pacman -S --noconfirm --needed ${packages[@]} | ||
|
||
# Enable testing repo only to checkout KF6Solid, KF6WindowSystem and layer-shell-qt | ||
cat >> /etc/pacman.conf <<EOF | ||
[core-testing] | ||
Include = /etc/pacman.d/mirrorlist | ||
[extra-testing] | ||
Include = /etc/pacman.d/mirrorlist | ||
EOF | ||
pacman -Sy --noconfirm | ||
|
||
lxqt2wip_packages=( | ||
layer-shell-qt | ||
kwindowsystem | ||
solid | ||
libdbusmenu-lxqt-git | ||
lxqt2-build-tools-git | ||
lxqt-menu-data-git | ||
libqt6xdg-git | ||
liblxqt-git | ||
lxqt-globalkeys-git | ||
libsysstat-git | ||
) | ||
pacman -S --noconfirm ${lxqt2wip_packages[@]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
TryExec=lxqt-panel | ||
|
||
# NOTE: KWin wants absolute path here, make sure it's correct | ||
Exec=/usr/local/bin/lxqt-panel | ||
|
||
# NOTE: adding KDE to make it work under Plasma Wayland session | ||
OnlyShowIn=LXQt;KDE | ||
X-LXQt-Module=true | ||
|
||
# Make KWin recognize us as priviledged client | ||
X-KDE-Wayland-Interfaces=org_kde_plasma_window_management |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Common interface for Window Manager abstraction backend | ||
# This also contains dummy backend | ||
|
||
add_library(lxqt-panel-backend-common STATIC | ||
|
||
lxqttaskbartypes.h | ||
ilxqttaskbarabstractbackend.h | ||
ilxqttaskbarabstractbackend.cpp | ||
|
||
lxqttaskbardummybackend.h | ||
lxqttaskbardummybackend.cpp | ||
) | ||
|
||
target_link_libraries(lxqt-panel-backend-common | ||
Qt6::Gui | ||
) | ||
|
||
add_subdirectory(wayland) | ||
add_subdirectory(xcb) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "ilxqttaskbarabstractbackend.h" | ||
|
||
|
||
ILXQtTaskbarAbstractBackend::ILXQtTaskbarAbstractBackend(QObject *parent) | ||
: QObject(parent) | ||
{ | ||
|
||
} | ||
|
||
void ILXQtTaskbarAbstractBackend::moveApplicationToPrevNextDesktop(WId windowId, bool next) | ||
{ | ||
int count = getWorkspacesCount(); | ||
if (count <= 1) | ||
return; | ||
|
||
int targetWorkspace = getWindowWorkspace(windowId) + (next ? 1 : -1); | ||
|
||
// Wrap around | ||
if (targetWorkspace > count) | ||
targetWorkspace = 1; //Ids are 1-based | ||
else if (targetWorkspace < 1) | ||
targetWorkspace = count; | ||
|
||
setWindowOnWorkspace(windowId, targetWorkspace); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
#ifndef ILXQTTASKBARABSTRACTBACKEND_H | ||
#define ILXQTTASKBARABSTRACTBACKEND_H | ||
|
||
#include <QObject> | ||
|
||
#include "lxqttaskbartypes.h" | ||
|
||
class QIcon; | ||
class QScreen; | ||
|
||
class ILXQtTaskbarAbstractBackend : public QObject | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit ILXQtTaskbarAbstractBackend(QObject *parent = nullptr); | ||
|
||
// Backend | ||
virtual bool supportsAction(WId windowId, LXQtTaskBarBackendAction action) const = 0; | ||
|
||
// Windows | ||
virtual bool reloadWindows() = 0; | ||
|
||
virtual QVector<WId> getCurrentWindows() const = 0; | ||
|
||
virtual QString getWindowTitle(WId windowId) const = 0; | ||
|
||
virtual bool applicationDemandsAttention(WId windowId) const = 0; | ||
|
||
virtual QIcon getApplicationIcon(WId windowId, int fallbackDevicePixels) const = 0; | ||
|
||
virtual QString getWindowClass(WId windowId) const = 0; | ||
|
||
virtual LXQtTaskBarWindowLayer getWindowLayer(WId windowId) const = 0; | ||
virtual bool setWindowLayer(WId windowId, LXQtTaskBarWindowLayer layer) = 0; | ||
|
||
virtual LXQtTaskBarWindowState getWindowState(WId windowId) const = 0; | ||
virtual bool setWindowState(WId windowId, LXQtTaskBarWindowState state, bool set = true) = 0; | ||
|
||
virtual bool isWindowActive(WId windowId) const = 0; | ||
virtual bool raiseWindow(WId windowId, bool onCurrentWorkSpace) = 0; | ||
|
||
virtual bool closeWindow(WId windowId) = 0; | ||
|
||
virtual WId getActiveWindow() const = 0; | ||
|
||
// Workspaces | ||
// NOTE: indexes are 1-based, 0 means "Show on All desktops" | ||
virtual int getWorkspacesCount() const = 0; | ||
virtual QString getWorkspaceName(int idx) const = 0; | ||
|
||
virtual int getCurrentWorkspace() const = 0; | ||
virtual bool setCurrentWorkspace(int idx) = 0; | ||
|
||
virtual int getWindowWorkspace(WId windowId) const = 0; | ||
virtual bool setWindowOnWorkspace(WId windowId, int idx) = 0; | ||
|
||
virtual void moveApplicationToPrevNextDesktop(WId windowId, bool next); // Default implementation | ||
virtual void moveApplicationToPrevNextMonitor(WId windowId, bool next, bool raiseOnCurrentDesktop) = 0; | ||
|
||
virtual bool isWindowOnScreen(QScreen *screen, WId windowId) const = 0; | ||
|
||
// X11 Specific | ||
virtual void moveApplication(WId windowId) = 0; | ||
virtual void resizeApplication(WId windowId) = 0; | ||
|
||
virtual void refreshIconGeometry(WId windowId, const QRect &geom) = 0; | ||
|
||
// Panel internal | ||
virtual bool isAreaOverlapped(const QRect& area) const = 0; | ||
|
||
// Show Destop TODO: split in multiple interfeces, this is becoming big | ||
// NOTE: KWindowSystem already has these functions | ||
// However on Wayland they are only compatible with KWin | ||
// because internally it uses org_kde_plasma_window_management protocol | ||
// We make this virtual so it can be implemented also for other compositors | ||
virtual bool isShowingDesktop() const = 0; | ||
virtual bool showDesktop(bool value) = 0; | ||
|
||
signals: | ||
void reloaded(); | ||
|
||
// Windows | ||
void windowAdded(WId windowId); | ||
void windowRemoved(WId windowId); | ||
void windowPropertyChanged(WId windowId, int prop); | ||
|
||
// Workspaces | ||
void workspacesCountChanged(); | ||
void workspaceNameChanged(int idx); | ||
void currentWorkspaceChanged(int idx); | ||
|
||
// TODO: needed? | ||
void activeWindowChanged(WId windowId); | ||
}; | ||
|
||
#endif // ILXQTTASKBARABSTRACTBACKEND_H |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the reason why only pager worked on arch.
This file has to be configured by cmake to match the installation path. Changing it to
/usr/bin
kwin_wayland session is fully functional here now :)Could have seen it earlier.