Hi, I have experienced troubles with popups in last version of Geany on Wayland. The context menu never shows and this message is printed to stdout: ``` Gdk-Message: 07:03:47.840: Window 0x55a9f5030360 is a temporary window without parent, application will not be able to position it on screen. (geany:1327711): Gdk-CRITICAL **: 07:03:47.846: gdk_wayland_window_handle_configure_popup: assertion 'impl->transient_for' failed ```
Also, the code-completion popups never show. Interestingly, when trying to invoke code-completion, no error is logged. So it might or might not be a different issue.
**Steps to reproduce:**
1. Open Geany on wayland (I'm using sway on Arch Linux, not sure if it works in other WMs/distros) 2. Right click in the editor 3. Nothing happens. No context menu is shown, only message appears on the stdout...
**Versions** ``` $ geany --version geany 1.38 (built on 2021-10-09 with GTK 3.24.30, GLib 2.70.0) ``` ``` $ pacman -Q geany gtk3 wayland wayland-protocols geany 1.38-1 gtk3 1:3.24.30+90+g20be04f7ac-1 wayland 1.19.0-2 wayland-protocols 1.23-1 ```
**Additional info**
I have tested the same with SciTE (Version 5.1.5 Scintilla:5.1.4 Lexilla:5.1.3 compiled for GTK:3.24.30) and it shows context menu just fine, so it is probably not Scintilla bug.
I have also tried with current master (5d4e7cfd5b12647b4cab9bda7278abd7f63e9c2f) in hope that #2930 might have fixed it. Unfortunately, it behaves just the same, no popups, just shows error.
The menu is not Scintilla so its not unexpected that it doesn't affect it.
No Geany devs use Wayland AFAIK so perhaps you could try replacing [this call](https://github.com/geany/geany/blob/5d4e7cfd5b12647b4cab9bda7278abd7f63e9c2f...) with a call to [this](https://docs.gtk.org/gtk3/method.Menu.popup_at_pointer.html) and see what happens.
Thanks for hint, I'll try it as soon as I'll have a little spare time.
@elextr: You were right, it does fix the context menus. I have created PR #3011 for this.
Unfortunatelly, it does not fix the autocomplete popups :frowning_face: I tried to find where the completion box is displayed and found [`show_autocomplete`](https://github.com/geany/geany/blob/a0333989f72e17cc221c41dbec7c16d50549b023... I understand it correctly, that part is handled by scintilla, right? Do you have any idea where to look in there, or should I just file a new bug in upstream?
I have created PR #3011 for this.
Thanks
If I understand it correctly, that part is handled by scintilla, right? Do you have any idea where to look in there, or should I just file a new bug in upstream?
Yes and Yes.
Don't forget to post the Scintilla bug link here.
Note, the reason I suggest going direct to Scintilla is that the autocomplete needs to popup near the caret, not the pointer, so its not the same solution.
Scintilla bug report: https://sourceforge.net/p/scintilla/bugs/2296/
Update: The autocomplete fix was accepted in scintilla: https://sourceforge.net/p/scintilla/code/ci/77364fe0845156aec5853f12d525f07d...
The fix has been released in Scintilla 5.1.5.
@elextr: Should I make a PR for Scintilla upgrade, or will this have to wait for next release cycle?
I'm working on it already, hopefully there will be a PR by the end of the day.
I have tried to run geany directly on Wayland after a while (i.e. without setting `GDK_BACKEND=x11`) and noticed that the autocomplete popups already work as expected. So the last thing to make geany 100% wayland ready is to fix the context menus.
I have updated #3011 and rebased it on current master. I have also tested that the context menus work fine with those changes. Can somebody please look at it and let me know if it is possible to merge it?
Closed #3009 as completed.
Looks like all the relevant bits were merged, so I'm closing. Feel free to reopen if there's still something missing from this issue.
github-comments@lists.geany.org