Moondust-Project icon indicating copy to clipboard operation
Moondust-Project copied to clipboard

[Editor] - Cannot Dock UI Components on Wayland Platforms

Open ChristianSilvermoon opened this issue 8 months ago • 11 comments

Which component? Editor, version 0.3.2.2-beta2 Architecture: x86_64 (64-bit) Revision: 00ed35949-master, Build date: 2025-04-21 13:04:37 UTC Qt: 5.15.15, SDL2: 2.32.4, SDL Mixer X: 2.8.0

Describe the bug Dockable UI Components are not Dockable on Wayland systems

To Reproduce Steps to reproduce the behavior:

  1. Start application on a Wayland system
  2. Open anything that creates an undocked window

Expected behavior It should be possible to drag the window, or a point/element in the window, in order to dock it into the main UI, as is possible when running the application on X11 Platforms

Screenshots

Image

Crash report and log files N/a

Desktop specs (please complete the following information):

Additional context Workaround:

# Unset the Wayland Display environment variable to force the use of xwayland
WAYLAND_DISPLAY= ./pge_editor

ChristianSilvermoon avatar Apr 21 '25 14:04 ChristianSilvermoon

Looks weird... If you built the thing from the source, it should use system-wide Qt. I may guess it's some problem of Qt because it should ensure the external window position and detect the fact that floating toolbox appears under the hot area of the main window where dock should be accepted. As I remember, Wayland in general had major problem of window metrics and position reporting and that makes complication between windows that expects absolute screen position. (That's a reason why Peek project got been halted).

Wohlstand avatar Apr 21 '25 14:04 Wohlstand

By the way... does your distro has Qt 6? Try to compile the project with the Qt 6, I added some options to allow Qt 6 build, but recently I didn't yet tested the Qt 6 build and I should ensure, does it ever builds...

Wohlstand avatar Apr 21 '25 14:04 Wohlstand

Okay, I fixed the build, however, there are some logical issues because of deprecated and removed signal of QComboBox, I need to fix it...

Wohlstand avatar Apr 21 '25 15:04 Wohlstand

Fixed logic too

Wohlstand avatar Apr 21 '25 15:04 Wohlstand

An important note: you should specify the -DPGE_FORCE_QT5=OFF to make it detect Qt 6 properly.

Wohlstand avatar Apr 21 '25 15:04 Wohlstand

-DPGE_FORCE_QT5=OFF

How can one do this utilizing the supplied ./build.sh, or is there another method I should use?

ChristianSilvermoon avatar Apr 22 '25 03:04 ChristianSilvermoon

As I remember, I didn't tweaked the buuld.sh script yet to work with Qt 6, so, do build the project using CMake directly. You don't need so much arguments, except of "use system png" and something that you can find via ccmake.

Wohlstand avatar Apr 22 '25 03:04 Wohlstand

As I remember, I didn't tweaked the buuld.sh script yet to work with Qt 6, so, do build the project using CMake directly. You don't need so much arguments, except of "use system png" and something that you can find via ccmake.

In my attempts I appear to be unable to figure out how to resolve these missing dependencies on my own ^^'

I'm on a Fedora-based system, but can't identify which packages would provide what I'm missing here.

 Qt6LinguistTools_DIR            *Qt6LinguistTools_DIR-NOTFOUND                                                                                                                                
 Qt6Network_DIR                  */usr/lib64/cmake/Qt6Network                                                                                                                                  
 Qt6QmlCompilerPlusPrivateTools  *Qt6QmlCompilerPlusPrivateTools_DIR-NOTFOUND

also thank you so much for mentioning ccmake this is going to make my life a lot easier in the future, I wish I'd learned about it ages ago ^^

ChristianSilvermoon avatar Apr 22 '25 18:04 ChristianSilvermoon

At me I had to install any packages with "qt6" mentioning using apt search and finding anything that is similar. LinguistTools primarily needed to convert translations from XML into binary format, the QtNetwork is used primarily for interprocessing communications and for manual update checks at the Editor. Qml module is needed for Editor because of JavaScript engine depends on it.

Wohlstand avatar Apr 22 '25 18:04 Wohlstand

At me I had to install any packages with "qt6" mentioning using apt search and finding anything that is similar. LinguistTools primarily needed to convert translations from XML into binary format, the QtNetwork is used primarily for interprocessing communications and for manual update checks at the Editor. Qml module is needed for Editor because of JavaScript engine depends on it.

Well I do have qt6-linguist installed :thinking: The latter one I was unable to find a package for

ChristianSilvermoon avatar Apr 22 '25 19:04 ChristianSilvermoon

Well I do have qt6-linguist installed 🤔

Linguist is a translation editor tool, the linguist tools are lupdate to sync translations with a code (if new strings added or old removed or changed), and lrelease to convert XML into binary format of translations.

Wohlstand avatar Apr 22 '25 19:04 Wohlstand