Skip to content

Commit

Permalink
Merge gfgit/wlroots-taskbar_new into wlroots-taskbar
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusbritanicus committed Apr 18, 2024
2 parents c3d0531 + bf283bf commit 92577e9
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 92 deletions.
6 changes: 4 additions & 2 deletions autostart/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file(GLOB DESKTOP_FILES_IN *.desktop.in)
set(DESKTOP_FILES lxqt-panel.desktop.in)

# Translations **********************************
lxqt_translate_desktop(DESKTOP_FILES
Expand All @@ -15,8 +15,10 @@ install(FILES
COMPONENT Runtime
)

configure_file(lxqt-panel_wayland.desktop.in lxqt-panel_wayland.desktop @ONLY)

install(FILES
lxqt-panel_wayland.desktop
"${CMAKE_CURRENT_BINARY_DIR}/lxqt-panel_wayland.desktop"
DESTINATION "/usr/share/applications"
RENAME "lxqt-panel.desktop"
COMPONENT Runtime
Expand Down
14 changes: 14 additions & 0 deletions autostart/lxqt-panel_wayland.desktop.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Desktop Entry]
Type=Application
TryExec=lxqt-panel
NoDisplay=true

# NOTE: KWin wants absolute path here, get it from CMake install path
Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/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
5 changes: 4 additions & 1 deletion panel/backends/wayland/plasma/lxqttaskbarbackendplasma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,14 @@ bool LXQtTaskbarPlasmaBackend::isAreaOverlapped(const QRect &area) const

bool LXQtTaskbarPlasmaBackend::isShowingDesktop() const
{
return m_managment->isShowingDesktop();
return m_managment->isActive() ? m_managment->isShowingDesktop() : false;
}

bool LXQtTaskbarPlasmaBackend::showDesktop(bool value)
{
if(!m_managment->isActive())
return false;

enum LXQtTaskBarPlasmaWindowManagment::show_desktop flag_;
if(value)
flag_ = LXQtTaskBarPlasmaWindowManagment::show_desktop::show_desktop_enabled;
Expand Down
41 changes: 24 additions & 17 deletions panel/lxqtpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,23 +239,30 @@ LXQtPanel::LXQtPanel(const QString &configGroup, LXQt::Settings *settings, QWidg
// Create backing QWindow for LayerShellQt integration
create();

// Init Layer Shell (Must be done before showing widget)
mLayerWindow = LayerShellQt::Window::get(windowHandle());
mLayerWindow->setLayer(LayerShellQt::Window::LayerTop);
if(!windowHandle())
{
qWarning() << "LXQtPanel: could not create QWindow for LayerShellQt integration.";
}
else
{
// Init Layer Shell (Must be done before showing widget)
mLayerWindow = LayerShellQt::Window::get(windowHandle());
mLayerWindow->setLayer(LayerShellQt::Window::LayerTop);

mLayerWindow->setScope(QStringLiteral("dock"));
mLayerWindow->setScope(QStringLiteral("dock"));

LayerShellQt::Window::Anchors anchors;
anchors.setFlag(LayerShellQt::Window::AnchorLeft);
anchors.setFlag(LayerShellQt::Window::AnchorBottom);
anchors.setFlag(LayerShellQt::Window::AnchorRight);
mLayerWindow->setAnchors(anchors);
LayerShellQt::Window::Anchors anchors;
anchors.setFlag(LayerShellQt::Window::AnchorLeft);
anchors.setFlag(LayerShellQt::Window::AnchorBottom);
anchors.setFlag(LayerShellQt::Window::AnchorRight);
mLayerWindow->setAnchors(anchors);

mLayerWindow->setKeyboardInteractivity(LayerShellQt::Window::KeyboardInteractivityOnDemand);
mLayerWindow->setCloseOnDismissed(false);
mLayerWindow->setKeyboardInteractivity(LayerShellQt::Window::KeyboardInteractivityOnDemand);
mLayerWindow->setCloseOnDismissed(false);

mLayerWindow->setExclusiveEdge(LayerShellQt::Window::AnchorBottom);
mLayerWindow->setExclusiveZone(height());
mLayerWindow->setExclusiveEdge(LayerShellQt::Window::AnchorBottom);
mLayerWindow->setExclusiveZone(height());
}
}

// NOTE: Some (X11) WMs may need the geometry to be set before QWidget::show().
Expand Down Expand Up @@ -512,7 +519,7 @@ void LXQtPanel::setPanelGeometry(bool animate)

QRect rect;
LayerShellQt::Window::Anchors anchors;
LayerShellQt::Window::Anchor edge;
LayerShellQt::Window::Anchor edge = LayerShellQt::Window::AnchorBottom;

if (isHorizontal())
{
Expand Down Expand Up @@ -829,13 +836,13 @@ void LXQtPanel::updateWmStrut()
);
}
}
else if(qGuiApp->nativeInterface<QNativeInterface::QWaylandApplication>())
else if(mLayerWindow && qGuiApp->nativeInterface<QNativeInterface::QWaylandApplication>())
{
//TODO: duplicated code, also set in setPanelGeometry()

if (mReserveSpace)
{
LayerShellQt::Window::Anchor edge;
LayerShellQt::Window::Anchor edge = LayerShellQt::Window::AnchorBottom;

switch (mPosition)
{
Expand Down Expand Up @@ -865,7 +872,7 @@ void LXQtPanel::updateWmStrut()
mLayerWindow->setExclusiveZone(0);
}

// Make LayerShell apply changes immediatly
// Make LayerShellQt apply changes immediatly
windowHandle()->requestUpdate();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Desktop Entry/Name: "Seletor de cores"
Desktop Entry/Comment: "Obter a cor sob o cursor. Para desenvolvedores web"
Desktop Entry/Comment: "Obtém a cor sob o cursor e mantém uma lista de cores recentemente selecionadas"
38 changes: 19 additions & 19 deletions plugin-fancymenu/translations/fancymenu_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<message>
<location filename="../lxqtfancymenuappmap.cpp" line="49"/>
<source>Favorites</source>
<translation type="unfinished"></translation>
<translation>Favoriten</translation>
</message>
<message>
<location filename="../lxqtfancymenuappmap.cpp" line="55"/>
<source>All Applications</source>
<translation type="unfinished"></translation>
<translation>Alle Anwendungen</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -57,12 +57,12 @@
<message>
<location filename="../lxqtfancymenuconfiguration.ui" line="99"/>
<source>Auto-select after:</source>
<translation type="unfinished"></translation>
<translation>Automatische Auswahl nach:</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.ui" line="109"/>
<source> ms</source>
<translation type="unfinished"></translation>
<translation> ms</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.ui" line="134"/>
Expand Down Expand Up @@ -97,17 +97,17 @@
<message>
<location filename="../lxqtfancymenuconfiguration.ui" line="201"/>
<source>Layout</source>
<translation type="unfinished"></translation>
<translation>Layout</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.ui" line="210"/>
<source>Buttons row position</source>
<translation type="unfinished"></translation>
<translation>Position der Schaltflächenreihe</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.ui" line="217"/>
<source>Categories position</source>
<translation type="unfinished"></translation>
<translation>Position der Kategorien</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.cpp" line="81"/>
Expand All @@ -117,22 +117,22 @@
<message>
<location filename="../lxqtfancymenuconfiguration.cpp" line="111"/>
<source>Bottom</source>
<translation type="unfinished"></translation>
<translation>Unten</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.cpp" line="112"/>
<source>Top</source>
<translation type="unfinished"></translation>
<translation>Oben</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.cpp" line="117"/>
<source>Left</source>
<translation type="unfinished"></translation>
<translation>Links</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.cpp" line="118"/>
<source>Right</source>
<translation type="unfinished"></translation>
<translation>Rechts</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.cpp" line="179"/>
Expand Down Expand Up @@ -165,22 +165,22 @@
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="160"/>
<source>LXQt Configuration Center</source>
<translation type="unfinished"></translation>
<translation>LXQt-Konfigurationszentrum</translation>
</message>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="166"/>
<source>Leave</source>
<translation type="unfinished"></translation>
<translation>Verlassen</translation>
</message>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="172"/>
<source>About LXQt</source>
<translation type="unfinished"></translation>
<translation>Über LXQt</translation>
</message>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="185"/>
<source>Add your favorites by right clicking items from categories.</source>
<translation type="unfinished"></translation>
<translation>Fügen Sie Ihre Favoriten hinzu, indem Sie einen Rechtsklick auf Elemente aus den Kategorien machen.</translation>
</message>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="345"/>
Expand Down Expand Up @@ -217,22 +217,22 @@ Möchten Sie diese überschreiben?</translation>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="381"/>
<source>Remove from Favorites</source>
<translation type="unfinished"></translation>
<translation>Aus den Favoriten entfernen</translation>
</message>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="388"/>
<source>Add to Favorites</source>
<translation type="unfinished"></translation>
<translation>Zu den Favoriten hinzufügen</translation>
</message>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="572"/>
<source>No Executable</source>
<translation type="unfinished"></translation>
<translation>Keine ausführbare Datei</translation>
</message>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="573"/>
<source>Cannot find &lt;b&gt;%1&lt;/b&gt; executable.</source>
<translation type="unfinished"></translation>
<translation>Kann ausführbare Datei &lt;b&gt;%1&lt;/b&gt; nicht finden.</translation>
</message>
</context>
</TS>
22 changes: 11 additions & 11 deletions plugin-fancymenu/translations/fancymenu_ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<message>
<location filename="../lxqtfancymenuappmap.cpp" line="49"/>
<source>Favorites</source>
<translation type="unfinished"></translation>
<translation>お気に入り</translation>
</message>
<message>
<location filename="../lxqtfancymenuappmap.cpp" line="55"/>
<source>All Applications</source>
<translation type="unfinished"></translation>
<translation type="unfinished">すべてのアプリケーション</translation>
</message>
</context>
<context>
Expand Down Expand Up @@ -62,7 +62,7 @@
<message>
<location filename="../lxqtfancymenuconfiguration.ui" line="109"/>
<source> ms</source>
<translation type="unfinished"></translation>
<translation> ミリ秒</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.ui" line="134"/>
Expand Down Expand Up @@ -97,7 +97,7 @@
<message>
<location filename="../lxqtfancymenuconfiguration.ui" line="201"/>
<source>Layout</source>
<translation type="unfinished"></translation>
<translation>レイアウト</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.ui" line="210"/>
Expand All @@ -107,7 +107,7 @@
<message>
<location filename="../lxqtfancymenuconfiguration.ui" line="217"/>
<source>Categories position</source>
<translation type="unfinished"></translation>
<translation type="unfinished">カテゴリの位置</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.cpp" line="81"/>
Expand All @@ -117,7 +117,7 @@
<message>
<location filename="../lxqtfancymenuconfiguration.cpp" line="111"/>
<source>Bottom</source>
<translation type="unfinished"></translation>
<translation>下</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.cpp" line="112"/>
Expand All @@ -127,7 +127,7 @@
<message>
<location filename="../lxqtfancymenuconfiguration.cpp" line="117"/>
<source>Left</source>
<translation type="unfinished"></translation>
<translation>左</translation>
</message>
<message>
<location filename="../lxqtfancymenuconfiguration.cpp" line="118"/>
Expand Down Expand Up @@ -175,7 +175,7 @@
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="172"/>
<source>About LXQt</source>
<translation type="unfinished"></translation>
<translation>LXQt について</translation>
</message>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="185"/>
Expand Down Expand Up @@ -222,17 +222,17 @@ Do you want to overwrite it?</source>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="388"/>
<source>Add to Favorites</source>
<translation type="unfinished"></translation>
<translation type="unfinished">お気に入りに追加</translation>
</message>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="572"/>
<source>No Executable</source>
<translation type="unfinished"></translation>
<translation type="unfinished">実行可能ファイルがありません</translation>
</message>
<message>
<location filename="../lxqtfancymenuwindow.cpp" line="573"/>
<source>Cannot find &lt;b&gt;%1&lt;/b&gt; executable.</source>
<translation type="unfinished"></translation>
<translation>実行ファイル &lt;b&gt;%1&lt;/b&gt; が見つかりません。</translation>
</message>
</context>
</TS>
Loading

0 comments on commit 92577e9

Please sign in to comment.