GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Moving non decorated window using code.

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
Maskawanian



Joined: 02 Jul 2007
Posts: 3

PostPosted: Mon Jul 02, 2007 1:28 am    Post subject: Moving non decorated window using code. Reply with quote

I have a GTKWindow that I have created and then afterwards attempted to move using gtk_window_move(), I have the window set so that if I click on it it toggles the window's decorations, the default being none. For production I wish to have the window have no decorations, but If I configure the window in that manner I it won't move. It is an odd occurance considering alt-dragging still functions.

Does anyone have any suggestions on how to move the window? Should I attempt with libwnck (unstable I read)?

Thanks for any advice.

-- Dan
Back to top
caracal
GTK+ Geek


Joined: 21 Jun 2007
Posts: 91
Location: Wilkes Barre Pa

PostPosted: Thu Jul 05, 2007 7:00 pm    Post subject: Reply with quote

Im not sure how to do this with gdk but you could just use xlib

Here is a tutorial on having a window move itself around the screen etc.
http://users.actcom.co.il/~choo/lupg/tutorials/xlib-programming/xlib-programming-2.html#window_ops_move

I don't think libwnck is going to help you out much from what i know of it its only purpose is for building tasklists and desktop pagers.

Another way to possibly move a window around that has no decoration is to just
alt + spacebar
or ctrl + spacebar but this will only work if your window manager supports it.

So this is what i would do.

When you click on the window that has no frame add in some xlib code to get the window "id"
Then assign a xlib mouse move event to have the window follow your mouse cursor.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP