PDA

View Full Version : Viewport-attribute for windows?


RYX
May 11th, 2007, 01:24 PM
Hi! I just wondered if it would make sense to generally add a viewport X/Y attribute to windows to be able to set the preferred viewport on an application/toolkit-level. I guess this could be easily done with window-properties.

We could create a few functions and sent them as patch to gtk (like gtkwindow.move_to_viewport, gtkwindow.get_viewport_x, gtkwindow.get_viewport_y, gtkwindow.get_viewport_width, gtk.window.get_viewport_height) ... That way gtk-applications could "decide" on which viewport they want to appear. Of course this could be done for Qt as well ...

The largedesktop-feature seems to become much more popular so it could make sense if the toolkits were more aware of it.

:)

maniac
May 11th, 2007, 01:29 PM
Hi! I just wondered if it would make sense to generally add a viewport X/Y attribute to windows to be able to set the preferred viewport on an application/toolkit-level. I guess this could be easily done with window-properties.

We could create a few functions and sent them as patch to gtk (like gtkwindow.move_to_viewport, gtkwindow.get_viewport_x, gtkwindow.get_viewport_y, gtkwindow.get_viewport_width, gtk.window.get_viewport_height) ... That way gtk-applications could "decide" on which viewport they want to appear.

The largedesktop-feature seems to become much more popular so it could make sense if the toolkits were more aware of it.

:)
Before we bring this into the toolkits, IMO we should try to get this into the EWMH, otherwise I do not really think it will be accepted by the GTK guys. ;)

RYX
May 11th, 2007, 01:55 PM
That may be true :) ... It was only a thought anyway. I guess the approach of the winrules-plugin makes more sense for forcing windows to open on special viewports ...

mikedee
May 11th, 2007, 02:21 PM
I think you are too into the cube when you speak of viewports. I do not think they really make sense outside of compiz (ie. in the EWMH world) because a viewport is just a particular view of a large desktop. There are many many more possible viewports than 4 in a 2x2 arrangement, plane could easily stop at any point on the largedesktop, there is no reason why it has to go to a specific non-overlapping point.

To place a window on a specific viewport you would just work out the size of the desktop and place it at the correct position. Its easy to work out if the user is using the large desktop functionality because the desktop size would be larger than the screen resolution.