Re: window move handle widget



Am Thu, 28 Aug 2003 22:28:18 +0200 schrieb Gus Koppel:

Another way could be to manage the window dragging on your own by
tracking the mouse coordinates and moving the window accordingly. Drag
mode could be triggered by a "drag" button or even by just clicking
somewhere in the background of the window. AFAIK GTK doesn't provide
special support for such a feature so you'd have to program a bit more
on your own. By moving the window yourself you could of course keep
track of its coordinates and store and restore them between sessions
of your program (which isn't possible with GtkHandleBox's).

Thanks for your answer. I looked at GtkHandleBox and I think this is not
what I thought :-(

But the other idea is not bad. I found this function in the gtk
reference manual:  

gtk_window_begin_move_drag      (GtkWindow *window,
                                             gint button,
                                             gint root_x,
                                             gint root_y,
                                             guint32 timestamp);

It works well for static values of root_x and root_y, but how could I
get the current root_x, root_y mouse position inside my application?

Thanks
Andreas



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