Re: 3.0: remove client messages

[Please CC me on replies, I am not subscribed to the list.]


> I intend to remove the following things from GDK on my quest to get
> rid of GdkNativeWindow.
> structs:
> - GdkEventClientMessage:
> functions:
> - gdk_add_client_message_filter()
> - gdk_event_send_client_message()
> - gdk_event_send_clientmessage_toall()
> - gdk_event_send_client_message_for_display()
> signals:
> - GtkWidget::client
> That code like it hasn't been touched in years, Google codesearch
> didn't find any users and most importantly it's a horrendous API, so
> I'd be happy if I could just make it die instead of having to port it
> over to non-GdkNativeWindow usage.
> Which brings me to the point of this mail:
> Is there an actual user of this?

a bit late now, but I was just right now looking for a way for a gtk
application to receive ClientMessages and was a bit disappointed to see
that I cannot do that any more with gtk-3.

The use case here is my gtk-vector-screenshot¹ application where I’d
like to have the module loaded into all gtk-3 applications
automatically, but only do something after it has been signaled to do so
by a separate control application. This should give a much better user
experience than having to manually set GTK_MODULE and starting the
application on the terminal.

Having the module (and hence every application) listen to dbus signals
would be overkill and also make it slightly harder to find out which
program to notify for a given window to shoot, so XClientMessages seem
to be the perfect fit.

It seems that I can work-around the issue by abusing XProperties which,
when changed, still emit a GDK_PROPERTY_NOTIFY signal which I then can
intercept by overwriting the event handler gdk_event_handler_set.

There is no gtk_event_handler_get() that I can use to retain the
previous handler, so if more than one module tries to intercept events
between gdk and gtk, that is not possible, as both would directly call
gtk_main_do_event(), right?

Other ideas are welcome, of course.


Joachim "nomeata" Breitner
  mail: mail joachim-breitner de | ICQ# 74513189 | GPG-Key: 4743206C
  JID: nomeata joachim-breitner de |
  Debian Developer: nomeata debian org

Attachment: signature.asc
Description: This is a digitally signed message part

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]