0

Preconditions: My Qt program (MainWindow) works on FIRST Linux desktop, and I work on SECOND.

Program invokes such piece of code:

mainWindow->raise();

What happens? My Desktop Environment switches to the FIRST desktop and shows main window on my app.

What I want to happen? Main window of my app is moved to the current (SECOND) desktop and shows here.

Is it possible with Qt and how?

Mariusz Jaskółka
  • 4,137
  • 2
  • 21
  • 47
  • Have a look at [this](https://stackoverflow.com/questions/30113311/in-qt-5-whats-the-right-way-to-show-multi-monitor-full-screen-qwidget-windows?answertab=active#tab-top) – Redanium Nov 14 '18 at 20:31

1 Answers1

0

Qt not support full Linux DE/WM environment. Virtual desktop is like not real virtual desktop.

This is complex question. I'll try explain (bad english).

Desktops and workspaces on Linux X Window System: https://www.circuitousroot.com/artifice/programming/useful/fvwm/viewports/index.html

Qt use xcb: https://xcb.freedesktop.org/ Here we have xcb connection: http://doc.qt.io/qt-5/qx11info.html#connection This is hard way without other libraries: xcb, ICCCM, EWMH only... I have this issue for my application, but later. I have only dirty tests on pure C, and it works.

You can try use (or look how to implement, I watched here) KWindowSystem: https://api.kde.org/frameworks/kwindowsystem/html/classKWindowSystem.html (which not have KDE dependencies!!!) but this class not have all functionality for all EWMH commands.

Deep
  • 2,472
  • 2
  • 15
  • 25