Skip to content
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

use with lxqt #768

Closed
daktras420 opened this issue Feb 10, 2023 · 31 comments
Closed

use with lxqt #768

daktras420 opened this issue Feb 10, 2023 · 31 comments

Comments

@daktras420
Copy link

i am working on my system and really hate kwin and even kwinft.. and i would love to use the full lxqt list of applications using your de but the lxqt-panel doesn't load the way sfwbar waybar or any of the gtk based wayland bar apps run on your wm project. the following link will give you info why the lxqt team is having issues with using you wm as a wayland replacement for openbox on x11.
lxqt/lxqt#10 (comment)

@Consolatis
Copy link
Member

For panels all you need is usually

  • the wlr-layershell protocol
  • wlr-foreign-toplevel-management protocol
  • hopefully at some point in the future the ext-workspace protocol

I am not sure about the current state of the wayland support for lxqt-panel.
If there are specific issues in regards to labwc feel free to mention them.

@daktras420
Copy link
Author

daktras420 commented Feb 10, 2023 via email

@Consolatis
Copy link
Member

I am sorry but I will not read through a general wayland support issue with > 400 comments and search for (possibly long fixed) issues with labwc. But again, feel free to mention specific things that are still broken on the latest master branch or labwc 0.6.1.

@daktras420
Copy link
Author

daktras420 commented Feb 10, 2023 via email

@Consolatis
Copy link
Member

Consolatis commented Feb 10, 2023

with qt apps the wlr-layershell does not allow auto placement

We support the wlr-layershell protocol and (as far as I know) it works just fine as can be seen by various panels and notification daemons. I can't say anything about the Qt implementation of the layershell protocol or LxQt's usage of the protocol.

since theres no window rules
no automatic placement of app windows

This is true, we do not support automatic placement of windows but that is also absolutely not required for desktop components that use the layershell protocol, they can just dock to some edges and get positioned automatically (or provide a traditional desktop background).

but in x11 my only use for openbox was to integrate it onto lxqt and to be honest that is the only use i would have for your project as well

That is totally fine and actually the expected way to use labwc.
Labwc is just a boring compositor that tries to not get in your way and nothing more.

and like sfwbar go past the screen and make the ability to use a menu not functional

What does a panel not (yet) implementing scroll support for menus have to do with labwc?
If you are referring to usual window menus I am starting to think that your desktop components do not actually use wayland at all.
Do they show up as [xdg-shell] or as [xwayland] when you press A-Tab?
Applications using the layershell protocol should not show up in that list at all.

@johanmalm
Copy link
Collaborator

I've not studied the specifics of quoted threads, so am answering quite generically.

I don't think Qt popups work with the layer-shell protocol. I might be wrong on this, but from memory I think that was concluded on #sway-devel. Not sure of technical reasons.

I wrote a quick proof-of-concept QtLayerShell panel (https://github.com/johanmalm/tint) to get my head around how it works, and concluded that it only supports Qt's QWindow (or QRasterWindow) rather than QWidgets, QGraphicsScene and so on. This is still pretty powerful if you're writing a panel from scratch, but probably not that helpful if you're porting an existing one with QWidgets.

@jlindgren90 runs a Qt panel (https://github.com/jlindgren90/qmpanel) on labwc but I think it uses XWayland. That might be a useful reference point for helping port the lxqt-panel.

@johanmalm
Copy link
Collaborator

https://github.com/stefonarch/LXQt-Wayland-files quotes "No window rules with version 0.6, lxqt-panel not usable (manual placement)"

Do they mean rc.xml's <applications>
https://github.com/stefonarch/LXQt-Wayland-files

@LBCrion
Copy link

LBCrion commented Feb 11, 2023

and like sfwbar go past the screen and make the ability to use a menu not functional

What does a panel not (yet) implementing scroll support for menus have to do with labwc? If you are referring to usual window menus I am starting to think that your desktop components do not actually use wayland at all.

This seems to be a conflict between gtk and gtk-layer-shell and I expect it affects all applications using gtk-layer-shell. This is not a labwc issue. I was able to reproduce this on other compositors supporting the layer shell protocol. See LBCrion/sfwbar#75

@daktras420
Copy link
Author

daktras420 commented Feb 11, 2023 via email

@Consolatis
Copy link
Member

https://github.com/stefonarch/LXQt-Wayland-files quotes "No window rules with version 0.6, lxqt-panel not usable (manual placement)"

Do they mean rc.xml's <applications>

Yes: lxqt/lxqt#10 (comment)
I am not sure if we should support all of the listed ones though.

@johanmalm
Copy link
Collaborator

It feels like we need to get back to basics and do some requirements management here.

User Requirement

Key points from me:

  1. I consider the ability to run Qt Panels (with QtWidgets) with -platform wayland a 'User Requirement' which we ought to translate into some lower level system requirements for labwc-scope.

  2. QtWidgets (and therefore popups and so on) do not work with QtLayerShell. I might be wrong on this, and if so, appreciate correction and help to understand. I'm not sure what the technical problem is. QtLayerShell itself only works by hacking on private header files and thereby using unstable APIs, so I'm guess it's deeper than that.

  3. If (2) is true, labwc-scope does not yet support running Qt panels (except ones using a basic QWindow or QRasterWindow which seems irrelevant in the context of lxqt-panel).

I'd appreciate thoughts on the above before going much further, but will offer some quick thoughts on possible implementation approaches to help think through where to land system requirements.

System Requirements - High Level Options

Option A

Allow setting positions and roles via a protocol. Adoption of new protocols is pretty slow, so whilst this would be neat, it's likely to be a very long way home.

I'm not sure how lxqt-panel positions the window and assigns a role under kwin. If anyone knows, I'd appreciate a pointer.
@tsujan @stefonarch ?

plasma-shell does allow setting of position + role, but I can't find documentation of what different roles actually mean, so I guess it's pretty internal to plasma.

We adhere to a project principle to only use Wayland/wlroots protocols and not implement others in the interest of Wayland adoption (through less fragmentation). Now, wlroots already includes at least two KDE protocols (idle + server-decoration), so guess we could do some soul searching here if it turns out to be the best and most helpful way of dealing with this.

Option B

Allowing configuration of labwc window-rules to allow setting of position and role.

Openbox 3.6 specification describes window rules through the <applications> element. Ref: http://openbox.org/wiki/Help:Applications

For comparison, sway has the for_window command to implement window rules. See: https://man.archlinux.org/man/sway.5#CRITERIA

I haven't discussed this with @Consolatis and @jlindgren90 yet, but suppose this option might be a more in keeping with our general approach.

From a user perspective, the main disadvantage is that rc.xml would need to be edited in order to get a panel to work as desired. But on the other hand, it would work for all panels - not just the ones that happen to support plasma-shell protocol (or similar).

Panel Role

Regardless of option A, B or some other approach, I think we'd have to create a whole new object class because it couldn't be handled as a layer-shell client without supporting the layer-shell protocol and we wouldn't want it to be exactly like an xdg-toplevel-view.

Positioning of a panel should be pretty straight forward (and even the adjustment of 'usable area') but the behaviur of a panel is likely to be deeper.

Thinking off the top of my head, a panel would probably want to inherit the xdg-toplevel-view-implementation (=method dispatch), but:

  1. Have no decoration
  2. Not appear in server->views to avoid being handled by many desktop.c function such as alt-tab cycling.
  3. Always stay above/below normal views (so not be included in desktop_move_to_front() and so on. Openbox has the concept of 'above', 'normal' and 'below' layers. Currently we composite as listed below (not taking into account popups, xwayland unmanaged surfaces, etc) so I suppose we'd have to add an 'above' and 'below' layer either side of views...(?!?)
  • overlay layer (layer-shell protocol)
  • top layer (layer-shell protocol)
  • views (i.e. xdg-shell toplevels and xwayland 'managed' surfaces)
  • bottom layer (layer-shell protocol)
  • top layer (layer-shell protocol)

Side note 1: These two topics could be of interest http://openbox.org/wiki/Help:Configuration#Dock and http://openbox.org/wiki/Help:Configuration#Margins

Side note 2: There is a related issue on decoration protocols (xdg-decoration and kde-server-decoration) here: #594

@Consolatis
Copy link
Member

Consolatis commented Feb 13, 2023

Nice write-up. We do have an always-on-top tree for views already, we could add an always-on-bottom tree as well.

So the view part in your list above would be split in

  • always-on-top (which currently double functions as visible-on-all-desktops)
  • views
  • always-on-bottom

If coupled with some positioning magic, that could take care of desktop background / icon implementations. Dealing with decorations should already be doable, see d-feet for an example which simply refuses to use SSD decorations. We might need to enhance the logic and interaction between the two xdg and kde protocols though, we have at least one issue open about that as mentioned above. Using application policies seems a bit of a hack to disable the decorations when there are protocols to allow for that.

The obvious alternative here is the ext-layer-shell protocol MR and an implementation thereof in Qt (base or external module).
That MR includes feedback from plasma devs as far as I remember.

Another alternative for the panel would be to just run the panel via xwayland and try to get #625 implemented.
That way the panel would get access to usable_area for free (but would likely only work on labwc, so might not be ideal).
I don't know how many other wayland compositors with xwayland support provide support for that.

This still doesn't solve the missing foreign-toplevel support for the panel though, e.g. how to actually list the applications.
The xfce4-panel went with abstracting libwnck away + using wlr-layershell and wlr-foreign-toplevel management protocols.
Mate-panel tried to get initial wayland support working by ifdef constructs all over the place and also implemented the wlr-foreign-toplevel and wlr-layershell protocols. That is at least my understanding of the situation about a year ago, I did not follow
up on the current state.

In my opinion we should not start to implement features only to enhance usability of the current LXQt components alone.

I am personally not really a fan of the <applications> window policy thing and thus will likely not spend time implementing it but that feature at least provides additional enhancements that are usable outside of the LXQt usecase and it gets requested quite frequently.

If I would be in LXQt's shoes I would likely either

  • implement wlr-layer-shell + wlr-foreign-toplevel (and if there is indeed an issue with popups, try to get it fixed upstream)
  • or try to get ext-layer-shell and ext-foreign-toplevel-info / ext-foreign-toplevel-management / ext-workspace protocols merged into wayland-protocols, get them implemented in Qt (or in a module) and then use those.

Edit:
https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/wikis/home (on the bottom) lists KWin as supporting the wlr-layer-shell protocol. but I did not verify that and don't know if that list is up to date.

@tsujan
Copy link

tsujan commented Feb 13, 2023

If I would be in LXQt's shoes I would likely either...

For now, we don't add Wayland-specific codes (as we've always avoided X11-specific codes as far as possible), relying on Qt's Wayland support as well as on what can be expected from all Wayland compositors/WMs.

What we've done — and will continue to do — is making the codes work with Wayland in general (see lxqt/lxqt#2357). That has been done completely for libfm-qt, pcmanfm-qt and some other components (especially in git).

As for lxqt-panel and a few other components, we might need to add Wayland-specific codes at some point. Personally, I prefer to wait for what Qt6 might provide regarding Wayland. Qt6 is already more Wayland-compatible than Qt5; so, more tools might be added to it.

@stefonarch
Copy link
Contributor

stefonarch commented Feb 13, 2023

I'm not sure how lxqt-panel positions the window and assigns a role under kwin.

On all 4 compositors I'm running the panel as it is (without desktop-switcher)

  • can only work as top or left panel (position of popups is calculated from 0 0), better with 100% width
  • needs following rules
    1. stay on top
    2. position 0,0
    3. sticky
    4. no border|title
    5. preserve space (that's the most tricky, settings possible only in sway and hyprland

Some compositors do 3. without rules. I'm not running kwin with plasmashell.
But overall there are remaining issues:

  • windows sneak under it
  • it can be closed or moved, by shortcuts or mouse eventually
  • it's visible in the taskbar (yatbfw here) or in window switcher (have to check that in labwc but it should be so)

But on the positive side we have an application menu, tray, movable widgets, icons and panel size, quicklaunch with DND, and the powerful custom command plugin (display keyboard layout, numpad state, active workspace ecc ) , folder view, clock and calendar and some other monitor widgets - all configurable without fiddling with config files and restarting it.

Much appreciating for you all looking into this.

@Consolatis
Copy link
Member

Consolatis commented Feb 13, 2023

preserve space (that's the most tricky, settings possible only in sway and hyprland

For labwc (and possibly other compositors that support the wlr-layershell protocol) you could try something like this:

#!/usr/bin/env python3

import gi
gi.require_version("Gtk", "3.0")
gi.require_version('GtkLayerShell', '0.1')
from gi.repository import Gtk, GtkLayerShell

if __name__ == '__main__':
	win = Gtk.Window()
	win.set_size_request(-1, 26)
	GtkLayerShell.init_for_window(win)
	GtkLayerShell.auto_exclusive_zone_enable(win)
	GtkLayerShell.set_anchor(win, GtkLayerShell.Edge.LEFT, True)
	GtkLayerShell.set_anchor(win, GtkLayerShell.Edge.RIGHT, True)
	GtkLayerShell.set_anchor(win, GtkLayerShell.Edge.TOP, True)
	GtkLayerShell.set_layer(win, GtkLayerShell.Layer.BOTTOM)
	win.show()
	Gtk.main()

And then move the panel on top. Some compositors might interpret the exclusive zone part of the protocol a bit stricter than we do: Labwc just prevents windows that are tiled / maximized to go over the panel but you can manually move windows on top of it (which might trigger snapping though, that can be disabled via <snapping><range>0</range></snapping> in ~/.config/labwc/rc.xml).
This only works when the layershell client is not using the TOP or OVERLAY layers.

Edit:

it's visible in the taskbar (yatbfw here) or in window switcher (have to check that in labwc but it should be so)

Hm.. I would potentially be up for a small hack regarding this if @johanmalm agrees, e.g. defining some kind of app id that means "don't show in A-Tab OSD". Integrating that into the wlr-foreign-toplevel handling might be a bit more difficult without creating a maintenance burden.

Edit 2:
Windows being set to always-on-top won't show up in the A-Tab OSD because it only shows windows from the current workspace and always-on-top views are technically not part of any workspace. That is not really intended but nobody came forward with fixing this so far. It will still show up via wlr-foreign-toplevel though, e.g. on panels.

@stefonarch
Copy link
Contributor

stefonarch commented Feb 13, 2023

Nice hack, tested it on labwc but lxqt-panel (with "no decoration, stay on top) flips to the bottom when released somewhere in the white space.

And yes:

Windows being set to always-on-top won't show up in the A-Tab

EDIT: it works perfectly on hyprland , sway and wayfire, but as described unfortunately not on labwc (
screen_region_lun_08:48:22_

@johanmalm
Copy link
Collaborator

...But overall there are remaining issues:

* windows sneak under it
* it can be closed or moved, by shortcuts or mouse eventually
* it's visible in the taskbar (yatbfw here) or in window switcher (have to check that in labwc but it should be so)

On wayfire/sway/hyprland, do you use window-rules to get it to work. If so, would you mind posting your configs to help me think through approaches.

Assume you get the problems listed above with wayfire/sway/hyprland?

One approach would be to turn xdg_toplevel_view into some sort of xdg equivalent for unmanaged xwayland surfaces (override_redirect). I.e. support map/unmap/etc, but disable foreign-toplevel, remove them from server->views, and so on.

@stefonarch
Copy link
Contributor

stefonarch commented Feb 13, 2023

  • windows sneak under it

That is solved now by the script from @Consolatis (you can move a floating window also out of screen), but maximized windows don't go under it anymore.

On wayfire/sway/hyprland, do you use window-rules to get it to work. If so, would you mind posting your configs to help me think through approaches.

hyprland:

windowrule=move 0 0,lxqt-panel
windowrule=pin,lxqt-panel
windowrule=noborder,lxqt-panel
windowrule=noshadow,lxqt-panel
windowrule=opacity 1,lxqt-panel
windowrule=rounding 0,lxqt-panel

wayfire;

rule_19 = on created if app_id is "lxqt-panel" then move 0 0
rule_20 = on created if app_id is "lxqt-panel" then set always_on_top
rule_21 = on created if app_id is "lxqt-panel" then set sticky

sway:

    for_window [app_id="^lxqt-.*$"] floating enable
    for_window [app_id="lxqt-panel"]  sticky enable, border none

always_on_top isn't a real solution too as it visible on fullscreen windows too.

Full configs are here: https://github.com/stefonarch/LXQt-Wayland-files/tree/main/lxqt-wayland

@johanmalm
Copy link
Collaborator

johanmalm commented Feb 17, 2023

Seems like window-rules can be quite useful 😄

Appreciate comments on PR #787

It's a slightly different idea to the window rules in wayfire/hyprland/sway/kwin in that it merely converts an xdg-toplevel-view into an xdg-unmanaged just like we do for xwayland override_redirect surfaces.

It doesn't show up in the alt-tab dialogue which is a good start.

x/y positioning, usable_area, margins, rc.xml config, etc not considered yet. Hopefully detail that can be sorted out later if/when general approach is agreed on.

recording.webm

@Consolatis
Copy link
Member

Consolatis commented Feb 18, 2023

In case somebody wants to experiment with layer-shell-qt:

#include <QApplication>
#include <QMainWindow>
#include <QPushButton>
#include <LayerShellQt/shell.h>
#include <LayerShellQt/window.h>

int main(int argc, char **argv) {
	QApplication app(argc, argv);

	LayerShellQt::Shell::useLayerShell();

	QMainWindow main_window;
	QPushButton button;
	button.setText("foobar");
	main_window.setCentralWidget(&button);

	/* Ensure platform window is created */
	main_window.winId();

	QWindow *window = main_window.windowHandle();
	LayerShellQt::Window *layershell = LayerShellQt::Window::get(window);

	layershell->setAnchors({
		LayerShellQt::Window::Anchor::AnchorTop,
		LayerShellQt::Window::Anchor::AnchorLeft,
		LayerShellQt::Window::Anchor::AnchorRight
	});
	layershell->setLayer(LayerShellQt::Window::Layer::LayerBottom);

	layershell->setExclusiveZone(30);
	main_window.resize(0, 30);

	main_window.show();
	return app.exec();
}

CMakeLists.txt additions:

find_package(LayerShellQt REQUIRED)
target_link_libraries(example PRIVATE LayerShellQtInterface Qt5::Widgets)

johanmalm added a commit that referenced this issue Feb 24, 2023
@johanmalm
Copy link
Collaborator

In case somebody wants to experiment with layer-shell-qt:

Nice! Works well with winId(). I can't get popup's to work though. Will have to try a bit more tomorrow.

johanmalm added a commit that referenced this issue Feb 25, 2023
@jlindgren90
Copy link
Contributor

I can't get popup's to work though. Will have to try a bit more tomorrow.

I haven't tried it myself, but I get the impression that popups may not be implemented yet by qt-layer-shell. From https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/28#note_1361484:

In a slightly different vein, not inheriting from xdg_surface makes the popup case extremely messy to implement on the client side. ... It's been a blocker for us when Qt ships popups in tree and we try implementing layer shell externally. GTK users will face the same thing.

@tsujan
Copy link

tsujan commented Feb 27, 2023

I tried layer-shell-qt with lxqt-panel. The panel was on the top layer and it's role was DESKTOP_ENVIRONMENT; so far, so good. But all of its menus, tooltips and dialogs were also on the top layer and — worse than that — full-screen.

@Consolatis
Copy link
Member

Consolatis commented Feb 27, 2023

layer-shell-qt is implemented a bit different to the GTK variant from what I could see. With the GTK variant one creates a window, then give that window to a gtk-layer-shell function which then does the wrapping. This results in control of what windows are actual layershell clients and which are not. In the Qt variant instead it seems one is supposed to enable it for the whole application so all future windows seem to be layershell clients. I am not sure if that could be changed to work on a per-window basis as the GTK implementation and if that would help fix things.

Regarding the layer: I am usually using the bottom layer + exclusive zone for panels.
Although labwc should hide top layer shell clients when going into fullscreen and should only show those from the overlay layer on top so not sure what is going on there. Do you have a branch with your lxqt-panel changes somewhere?
Regarding the role: I am not sure what that is about. Sounds like some Qt internal thing.

@tsujan
Copy link

tsujan commented Feb 27, 2023

In the Qt variant instead it seems one is supposed to enable it for the whole application

Exactly. And that's a big problem.

To me, the irony is that, while GNOME tries to make GTK a GNOME-only toolkit, gtk-layer-shell is so cool, but although Qt can be used anywhere, layer-shell-qt is so poor. I hope they change it.

Do you have a branch with your lxqt-panel changes somewhere?

No, but I attach the patch that I used. It may need a small change to be applicable to the git branch but is very simple. Also, this can be added to it:

layershell->setScope(QStringLiteral("lxqt-panel"));

lxqt-panel.diff.zip

Edit by Consolatis: diff from the zip
diff -ruNp lxqt-panel-orig/CMakeLists.txt lxqt-panel/CMakeLists.txt
--- lxqt-panel-orig/CMakeLists.txt
+++ lxqt-panel/CMakeLists.txt
@@ -42,6 +42,7 @@ find_package(Qt5Xml ${REQUIRED_QT_VERSIO
 find_package(KF5WindowSystem ${KF5_MINIMUM_VERSION} REQUIRED)
 find_package(lxqt ${LXQT_MINIMUM_VERSION} REQUIRED)
 find_package(lxqt-globalkeys-ui ${LXQT_GLOBALKEYS_MINIMUM_VERSION} REQUIRED)
+find_package(LayerShellQt REQUIRED)
 
 # Patch Version
 set(LXQT_PANEL_PATCH_VERSION 0)
diff -ruNp lxqt-panel-orig/panel/CMakeLists.txt lxqt-panel/panel/CMakeLists.txt
--- lxqt-panel-orig/panel/CMakeLists.txt
+++ lxqt-panel/panel/CMakeLists.txt
@@ -104,6 +104,7 @@ target_link_libraries(${PROJECT}
     ${QTX_LIBRARIES}
     KF5::WindowSystem
     ${STATIC_PLUGINS}
+    LayerShellQtInterface
 )
 
 install(TARGETS ${PROJECT} RUNTIME DESTINATION bin)
diff -ruNp lxqt-panel-orig/panel/lxqtpanel.cpp lxqt-panel/panel/lxqtpanel.cpp
--- lxqt-panel-orig/panel/lxqtpanel.cpp
+++ lxqt-panel/panel/lxqtpanel.cpp
@@ -49,6 +49,9 @@
 #include <XdgIcon>
 #include <XdgDirs>
 
+#include <LayerShellQt/shell.h>
+#include <LayerShellQt/window.h>
+
 #include <KWindowSystem/KWindowSystem>
 #include <KWindowSystem/NETWM>
 
@@ -175,6 +178,10 @@ LXQtPanel::LXQtPanel(const QString &conf
     setWindowTitle(QStringLiteral("LXQt Panel"));
     setObjectName(QStringLiteral("LXQtPanel %1").arg(configGroup));
 
+    bool underWayland = QGuiApplication::platformName() == QStringLiteral("wayland");
+    if (underWayland)
+        LayerShellQt::Shell::useLayerShell();
+
     //LXQtPanel (inherits QFrame) -> lav (QGridLayout) -> LXQtPanelWidget (QFrame) -> LXQtPanelLayout
     LXQtPanelWidget = new QFrame(this);
     LXQtPanelWidget->setObjectName(QStringLiteral("BackgroundWidget"));
@@ -234,6 +241,21 @@ LXQtPanel::LXQtPanel(const QString &conf
     // NOTE: Some (X11) WMs may need the geometry to be set before QWidget::show().
     setPanelGeometry();
 
+    if (underWayland)
+    {
+        winId();
+        if (QWindow* win = windowHandle())
+        {
+            if (LayerShellQt::Window* layershell = LayerShellQt::Window::get(win))
+            {
+                layershell->setLayer(LayerShellQt::Window::Layer::LayerTop);
+                LayerShellQt::Window::Anchors anchors = {LayerShellQt::Window::AnchorTop};
+                layershell->setAnchors(anchors);
+                layershell->setKeyboardInteractivity(LayerShellQt::Window::KeyboardInteractivityOnDemand);
+            }
+        }
+    }
+
     show();
 
     // show it the first time, despite setting

@Consolatis
Copy link
Member

Consolatis commented Feb 27, 2023

But all of its menus, tooltips and dialogs were also on the top layer and — worse than that — full-screen.

Oh, I think I got that wrong, you mean tooltips and friends are layershell clients and fullscreen themselves.
Right.. that makes sense. I've looked a bit into the layer-shell-qt implementation earlier and they in fact anchor to all edges by default.

So if that doesn't get overwritten before the first show() the result will be layershell surfaces anchored to all edges, e.g. fullscreen. I have no clue why they implemented it like this. layer-shell-qt could really need some help to make it actually usable. I wonder if they could simply not set the initial settings and then when showing the surface and there are no layershell specific settings set not initialize the layershell protocol at all.

Edit:
This MR looks like it could potentially solve the issue but my knowledge of Qt (and C++ for that matter) is too limited to be able to say for sure.

@tsujan
Copy link

tsujan commented Feb 27, 2023

So if that doesn't get overwritten before the first show() the result will be layershell surfaces anchored to all edges

Yes, that's the default, but the default isn't the problem. The problem is that every window of your app is affected, while you want to put a specific window (usually, the main window) on a layer and leave the others to the WM.

This MR looks like it could potentially solve the issue

I'll take a look at it. Thanks!

EDIT: Sadly, that branch can't even be compiled.

@johanmalm
Copy link
Collaborator

See #933

Doing pcmanfm-qt --desktop first. lxqt-panel later.

@Consolatis
Copy link
Member

On another note, it seems https://invent.kde.org/plasma/layer-shell-qt/-/merge_requests/25 that allows to have xdg-shell and layershell windows within the same application has been merged but I didn't look into it nor tested it.

@stefonarch
Copy link
Contributor

Dropping an update here, all looks quite promising, taskbar should come also for labwc and other compositors:

https://share.mailbox.org/ajax/share/0080f490003dac420d9dbc703dac45b28629d4b1f94e50c2/1/8/NDA/NDAvMTA

@johanmalm
Copy link
Collaborator

This has been an amazing thread, but I feel it's served its purpose. Suggest we close and open new issues for specific things?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants