Re: Gtk::window.present() doesn't always present



Hello everybody,

I've experimented somewhat with the timestamps. I used Havoc's method to retrieve the event timestamp and send it to another program which then uses it to present with timestamp. Sometimes it looked like it was working but it isn't a 100% solution.

I also experimented with Gtk::Widget::signal_button_press_event (  )  which gives me a timestamp as argument so I can be sure I have to 'correct' timestamp for the event. This also didn't work.

What seams to be working the best is not using the signal_clicked but the signal_pressed. This because after a signal_pressed you get a new event signal_released. And getting a new event seams to be the best way to get some 'presenting action'. Because generating mouse movements or clicks also worked, like I wrote in my first message.

It is working rather well now but I am curious how to get this under control without a work-around feeling..


Greetings Harm

ps. I removed the cc to metacity-list because I thought it didn't looked necessary anymore


Havoc Pennington wrote:
Elijah Newren wrote:
  
event.  gtk_get_current_event_time() kind of hides whether there is a
valid current event or not and people who use it tend to ignore
whether they have a valid timestamp or a bogus one (GDK_CURRENT_TIME),
and just use what it returns regardless.

    

Wouldn't it be correct to write:

  int t = gtk_get_current_event_time();
  if (t != GDK_CURRENT_TIME)
    /* use the time */;

With the event route, it seems people need to do something like:

GdkEvent *event = gtk_get_current_event();
if (event != NULL) {
   switch (event->type) {
   case GDK_BUTTON_PRESS:
   case GDK_KEY_PRESS:
   ...

}

Havoc

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

  


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