Re: Dragging a window



ehh didn't know alt + click did that :)

tried that set_position() but doesn't seem to be doing anything.

Anyway, I think I need to explain it better. I'm making a screen ruler
and I want to be able to drag it around by just clicking on it.
So maybe there's an option to turn the window to behave like that? or
a drag event where I can force the window to move...

On Sun, Dec 11, 2011 at 1:52 AM, Harry van Haaren <harryhaaren gmail com> wrote:
> Press ALT while left clicking on it... nah just kidding.
>
> I presume you want to do it in code... so you could inherit the Gtk::Window
> class, and add a custom "on_click" handler, and have that call
> gtk_window_set_position (GtkWindow *window, GtkWindowPosition position);
>
> These are your WindowPosition flags:
>
>   GTK_WIN_POS_NONE,
>   GTK_WIN_POS_CENTER,
>   GTK_WIN_POS_MOUSE,
>   GTK_WIN_POS_CENTER_ALWAYS,
>   GTK_WIN_POS_CENTER_ON_PARENT
>
>
> Only problem is that GTK can only set these couple of flags for the window
> manager, and there's no promises that the window manager is going to adhere
> to these...
>
> Good luck, -Harry
>
> PS: I think it a rather bad idea to do this... its not particularly user
> friendly!


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