Forum > QT

(Solved) that possible to make QWindow appear on all Virtual Desktop with Xlib?

<< < (2/3) > >>

MarkMLl:

--- Quote from: Dio Affriza on June 19, 2022, 01:45:45 pm ---Yeah, kind of like Window Manager concept but I don't want to make a full scale WM, just the task manager. I think the correct word is Virtual Desktop, I'm not sure which one (I guess?).
Currently it works really well but the problem is if switch to desktop 2, the taskbar just gone. Or, should I make multiple form?

--- End quote ---

An X11/unix Window Manager is not a concept, it's a specific term for the subsystem which provides the "furniture" around Windows including scrollbars and the buttons on the title bar.

Traditionally, you could stop the current Window Manager and replace it with a different one... something that might be more difficult now that it typically includes the desktop environment's taskbar etc. And while some WMs supported multiple Virtual Desktops hence also a "pin" button, others didn't. See https://en.wikipedia.org/wiki/Fvwm

MarkMLl

AFFRIZA 亜風実:

--- Quote from: MarkMLl on June 19, 2022, 02:16:15 pm ---An X11/unix Window Manager is not a concept, it's a specific term for the subsystem which provides the "furniture" around Windows including scrollbars and the buttons on the title bar.

Traditionally, you could stop the current Window Manager and replace it with a different one... something that might be more difficult now that it typically includes the desktop environment's taskbar etc. And while some WMs supported multiple Virtual Desktops hence also a "pin" button, others didn't. See https://en.wikipedia.org/wiki/Fvwm

MarkMLl

--- End quote ---
Yeah, but I don't want to make a Window Manager, just the taskbar. I want to keep a minimal plasma panel on the top while my app handle the minimize and maximize event, just let the KWin doing it's job. But, I think that's not my question.

There's also something called Conky system monitor that can make them displayed on all virtual desktop, I just thinking to doing like that since this is more for Free Pascal showcase in my place to make many Free Pascal app examples as possible. In this show case I want to make a taskbar for KDE, something like a LatteDock, and I have a problem to display the window in all virtual desktops.

MarkMLl:

--- Quote from: Dio Affriza on June 19, 2022, 02:35:13 pm ---Yeah, but I don't want to make a Window Manager, just the taskbar.

--- End quote ---

I didn't say you did. I said that "Window Manager" was a specific X11 subsystem, implied that there was functionality you might not be able to usurp, and pointed you at something that confirmed that "Virtual Desktop" might actually be the correct phrase.

I believe that there is a Window Manager control library but it might not be installed by default, a quick grep doesn't yield the name. I don't know the extent to which this is distinct from sending control messages, and in any event the current Window Manager- and I remind you of peculiarities like the Raspberry Pi where they provide their own- might or might not implement the facility you're asking for.

MarkMLl

Fred vS:

--- Quote from: Dio Affriza on June 19, 2022, 12:44:18 pm ---Something like:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses  ..., Qt, QtWidgets;...procedure TfrDock.FormShow(Sender: TObject);var  SelfWindow: TWindow;  Atom: TAtom;  prop: culong;begin  Atom := XInternAtom(Display, '_NET_WM_DESKTOP', LongBool(1));  SelfWindow := QWidget_winId(TQtMainWindow(Self.Handle).Widget);  XChangeProperty(Display, SelfWindow, Atom, XA_CARDINAL,    32, PropModeReplace, @prop, 1);   XMapWindow(Display, SelfWindow);end;   
--- End quote ---

Hello.

Did you try with this?:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---... prop:= $FFFFFFFF; XChangeProperty(Display, SelfWindow, Atom, XA_CARDINAL,    32, PropModeReplace, @prop, 1);...
You may try also setting prop := 0, prop := 1, prop := 2, ... to set each virtual desktop.

See here:
https://stackoverflow.com/questions/43376991/stick-c-app-to-all-desktops

AFFRIZA 亜風実:

--- Quote from: Fred vS on June 19, 2022, 04:09:24 pm ---Hello.

Did you try with this?:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---... prop:= $FFFFFFFF; XChangeProperty(Display, SelfWindow, Atom, XA_CARDINAL,    32, PropModeReplace, @prop, 1);...
You may try also setting prop := 0, prop := 1, prop := 2, ... to set each virtual desktop.

See here:
https://stackoverflow.com/questions/43376991/stick-c-app-to-all-desktops

--- End quote ---
I have read that. Anyway, after wondering around and reading the KWin source I finally found the solution. I'll update the code of the post.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version