Dragging a window without focus
- From: "natan yellin" <aantny gmail com>
- To: gtk-app-devel-list gnome org
- Subject: Dragging a window without focus
- Date: Thu, 10 Apr 2008 22:52:20 +0300
I've been trying on and off for the past few weeks to use the function
gdk_window_begin_move_drag on a window in my application. If I call the
function in the callback for a button-press-event it works fine. However, if
I attempt to call the function in response to a client-event (or anything
but a button-press-event) it fails miserably and silently.
At first I thought that the problem was the event's timestamp. I tested and
found that gdk_window_begin_move_drag works after several repeated
client-events, so I've began to doubt that is the problem.
It's worth pointing out that the function gtk_menu_popup behaves in the same
way. It works fine on a button-press-event but does nothing otherwise.
I suspect that the functions are failing because the GdkWindow doesn't have
focus, however I'm not sure how to fix that. I've spent a large number of
hours trying to solve this myself, and I'm out of ideas. Any help on this
would be greatly appreciated.
] [Thread Prev