Hello list,
In my app I have a window that, depending on the state of the program may or may not have called Bind() on key down events. Whether it’s listening to key events or not, I get the following message whenever the window is focused and the user presses a key:
(notes.py:8920): Gdk-WARNING **: /build/buildd/gtk+2.0-2.24.25/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window
notes.py is the main file of my program, but it DOES NOT have more than 8k lines. The only times when this message doesn’t appear is when the window HAS called Bind() on key events AND it’s a key that my window cares about, so it processes it. If the window is listening but Skips() the event, the message appears again.
I have no idea what this could mean or where to begin looking. Has anybody got any pointers on how to debug this?
Hello list,
In my app I have a window that, depending on the state of the program
may or may not have called Bind() on key down events. Whether it's
listening to key events or not, I get the following message whenever the
window is focused and the user presses a key:
(notes.py:8920): Gdk-WARNING **:
/build/buildd/gtk+2.0-2.24.25/gdk/x11/gdkdrawable-x11.c:952 drawable is
not a pixmap or window
notes.py is the main file of my program, but it DOES NOT have more than
8k lines.
It's not the line number, it is the process ID. The GDK error handlers are just getting the process name and ID from the system, as they know nothing about the python code.
The only times when this message doesn't appear is when the
window HAS called Bind() on key events AND it's a key that my window
cares about, so it processes it. If the window is listening but Skips()
the event, the message appears again.
I have no idea what this could mean or where to begin looking. Has
anybody got any pointers on how to debug this?
What kind of window is it? If it's a native widget then the result of intercepting system events can sometimes be "undefined" so it may be confusing whatever native event handler is getting control next.
I have since started a major rewrite of my application and as of right now I don’t see the problem anymore.
Just for the record, the faulty window was a plain wx.Window, child of a Panel that didn’t have a Sizer. The Panel was a child of another one, which was the Page of a Notebook, which was inside a Frame. All of these windows had accelerators and keybindings; that’s why I didn’t bother with a sample app and only asked in case it rang a bell about a past experience.
···
On Friday, March 6, 2015 at 8:31:48 PM UTC-5, Robin Dunn wrote:
Leonardo Torres wrote:
Hello list,
In my app I have a window that, depending on the state of the program
may or may not have called Bind() on key down events. Whether it’s
listening to key events or not, I get the following message whenever the
window is focused and the user presses a key:
(notes.py:8920): Gdk-WARNING **:
/build/buildd/gtk+2.0-2.24.25/gdk/x11/gdkdrawable-x11.c:952 drawable is
not a pixmap or window
notes.py is the main file of my program, but it DOES NOT have more than
8k lines.
It’s not the line number, it is the process ID. The GDK error handlers
are just getting the process name and ID from the system, as they know
nothing about the python code.
The only times when this message doesn’t appear is when the
window HAS called Bind() on key events AND it’s a key that my window
cares about, so it processes it. If the window is listening but Skips()
the event, the message appears again.
I have no idea what this could mean or where to begin looking. Has
anybody got any pointers on how to debug this?
What kind of window is it? If it’s a native widget then the result of
intercepting system events can sometimes be “undefined” so it may be
confusing whatever native event handler is getting control next.