[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk-app-devel
Subject: XError BadAccess with gdk_window_set_events
From: Tobias Henle <tobias () page23 ! de>
Date: 2003-03-28 14:33:36
[Download RAW message or body]
Hello List,
_Sorry_ for the second try but i have had the wrong sender adress :(
I have a problem with the function gdk_window_set_events in gtk2.
I want to recive events from the root window and using set_events function
results in an XError. I wrote a short code example to reproduce this error.
8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - -
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
int main(int argc, char *argv[])
{
GdkWindow *root_window;
gtk_init(&argc, &argv);
root_window = gdk_window_lookup(GDK_ROOT_WINDOW());
g_message("1");
gdk_window_set_events(root_window,
GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK);
g_message("2");
gtk_main();
return 0;
};
8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - -
If i compile this code and run it i using the --sync option i get the folowing
output:
8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - -
(tobias=hal9000=src/lsiconbox/xfce_deskback)./desktop --sync
** Message: 1
The program 'desktop' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
(Details: serial 51 error_code 10 request_code 2 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - - 8< - -
this error can be reproduced with ether gtk 2.0 or gtk 2.2.1
cya
-toby
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic