Re: getting GDK_GRAB_NOT_VIEWABLE for keyboard grab
- From: Artur Galyamov <artur-pub yandex ru>
- To: Thura <thurahlaing06 gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: getting GDK_GRAB_NOT_VIEWABLE for keyboard grab
- Date: Sun, 06 Dec 2009 18:33:04 +0300
Hi!
Maybe your window isn't mapped yet from X (or just Gdk) perspective, so no
grabs are possible. You must wait GDK_MAP event -- try to connect-after
"map-event" of object->window and grab there. Must solve your problem, IMHO.
Most Gtk methods are not synchronous -- fullscreen() and show_all() just
queue operations into Gdk or send X requests and return.
--
Artur
06.12.09, 16:12, "Thura" <thurahlaing06 gmail com>:
I am trying to grab keyboard for my application window, and getting return
value "3" (GDK_GRAB_NOT_VIEWABLE) ...
Any clue?
Here is my code.
gtk_window_fullscreen (GTK_WINDOW(object->window));
gtk_widget_show_all (GTK_WIDGET(object->window));
int retval = gdk_keyboard_grab (object->window->window, FALSE,
GDK_CURRENT_TIME);
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]