Re: Corrupt GDK_DESTROY event
- From: Emmanuele Bassi <ebassi gmail com>
- To: Matthew Allen <memecode gmail com>
- Cc: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: Corrupt GDK_DESTROY event
- Date: Sat, 16 Jan 2016 01:46:12 +0000
Hi;
On 16 January 2016 at 01:36, Matthew Allen <memecode gmail com> wrote:
I'm developing applications based on a widget library called LGI:
https://github.com/memecode/Lgi
The Linux back end uses GTK2 and I'm having trouble with the GDK_DESTROY
event being corrupt by the time it reaches my application.
There is no such thing as a "GDK_DESTROY" event.
In GWindow::Attach I setup a the signal handler:
GView *i = this;
g_signal_connect( G_OBJECT(Wnd),
"destroy",
G_CALLBACK(GtkViewCallback),
i);
As you may notice from the "destroy" signal, the callback signature is:
void (* destroy) (GtkObject *widget, gpointer user_data);
https://developer.gnome.org/gtk2/stable/GtkObject.html#GtkObject-destroy
So you're literally looking at your user data.
You should look at the API reference for the description and signature
of a signal before connecting a callback to it.
Ciao,
Emmanuele.
--
https://www.bassi.io
[ ] ebassi [ gmail com]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]