You are not logged in.

#1 2019-12-10 14:50:32

BwK
Member
Registered: 2019-09-25
Posts: 14

[Solved] Code Navigation in Geany broken when using Gnome/Budgie

The code navigation in Geany seems to be broken when using Gnome (or Budgie). For example I have two files open, a source file that contains a function and a header file that contains the function prototype.

test.cpp:

#include <iostream>
#include "test.h"

void testPrint ()
{
    std::cout << "Hello World" << std::endl;
}

int main(int argc, char **argv)
{
	testPrint();
	return 0;
}

test.h:

void testPrint ();

Now I can use CTRL + Left Mouse on testPrint inside the main function to jump to the implemented function in main.c. If I use CTRL + Left Mouse on the implemented testPrint function, Geany will switch to the test.h tab and go to the function prototype. However, this only works, if only one function prototype with this name is available in the current session. If I open a third file, lets say test2.h, with the same content as test.h, then Geany gives me the following error message when using CTRL + Left Mouse on the implemented testPrint function:

GLib-GObject CRITICAL	: g_object_set_data: assertion 'G_IS_OBJECT (object)' failed

When doing the same scenario in a XFCE or Openbox session, then Geany does not give any error message and opens a context menu where I can select whether I want to switch to the function prototype in test.h or test2.h.

Does anyone have an idea how to solve this problem or at least where I can start digging deeper into this? My system is up to date.

Thanks, BwK

Last edited by BwK (2019-12-11 13:35:00)

Offline

#2 2019-12-11 04:32:11

glitsj16
Member
Registered: 2015-04-26
Posts: 126

Re: [Solved] Code Navigation in Geany broken when using Gnome/Budgie

I've tested geany/geany-plugins (GTK2 and GTK3 versions) on GNOME using a Wayland session and for me it works as advertised. Are you running GNOME on X11 or on Wayland? What happens when you force running geany on X11 via 'GDK_BACKEND=x11 geany'?

Offline

#3 2019-12-11 07:52:23

BwK
Member
Registered: 2019-09-25
Posts: 14

Re: [Solved] Code Navigation in Geany broken when using Gnome/Budgie

I am using a Wayland session, too. I double checked it using the script, I found here:

https://unix.stackexchange.com/question … being-used

Running geany on X11 via 'GDK_BACKEND=x11 geany' did not work, so I tried to start 'Gnome under Xorg' in LightDM. Strange thing here: the above script still says 'Wayland'? So after this, I used GDM to start 'Gnome under Xorg' and now I have a X11 session: Still the same error with geany. Then I tried starting Gnome in a Wayland session using GDM: Now geany is working as it should. Nevertheless, it still throws an error message:

Gdk-Message: 08:34:34.032: Window 0x561513078410 is a temporary window without parent, application will not be able to position it on screen.
Gdk-Message: 08:34:34.033: Window 0x561513078410 is a temporary window without parent, application will not be able to position it on screen.

(geany:4224): Gdk-CRITICAL **: 08:34:34.045: gdk_wayland_window_handle_configure_popup: assertion 'impl->transient_for' failed

At least it makes no difference for me whether I use LightDM or GDM. But there is still the question: Why is the Wayland session LightDM creates not working and why is LightDM starting a Wayland session, when I select 'Gnome under Xorg'?

Offline

#4 2019-12-11 13:34:43

BwK
Member
Registered: 2019-09-25
Posts: 14

Re: [Solved] Code Navigation in Geany broken when using Gnome/Budgie

It looks like, that LightDM is not starting a Wayland session at all. After working for a while in the Wayland session that was started by GDM, I stumbled upon some problems that come with Wayland (e.g. Synergy or VNC). So I switched back to X11 and by accident I found the reason for my problem. In gnome-tweaks, I had enabled the option to show the location of the mouse pointer when pressing CTRL. After disabling it, everything works as expected and no error/debug messages are shown roll

Thanks for guiding me in the right direction. Problem solved.

Offline

Board footer

Powered by FluxBB