Hans de Goede
2006-10-05 20:45:24 UTC
Hi all,
Please CC me directly on any replies as I'm not subscribed to the list.
I've encountered the following problem with clanlib when using openGL in
fullscreen mode:
1) When using metacity as a window manager changing the override
redirect flag after the window has been mapped once doesn't have any
effect, causing the window to still be managed by the wm. I assume
other wm's suffer from this too.
In general if you want to use override redirect you must set it
before the first mapping of the window, otherwise it will not
(always) work. I know that both SDL and allegro do this to make sure
override redirect works. (I wrote the current version of the allegro
fullscreen code).
2) So we have a still windowmanaged window, not really a problem as it
has the exact resolution of an available mode and we are going to
grab the mouse constraining it to our window, switch to this mode and
set the viewport to our window, so no-one will notice the decorations
3) Problem the decoration is 5 pixels wide and the wm ususally will
decide to place such a large window at 0,0 as we requested, so the
viewport will have to start at an x coordinate of 5, however not all
cards allow setting the viewport x coordinate to an pixel exact
value. For example my radeon 9800 with opensource dri drivers sets
the viewport to start (x) at 4 when you ask for 5 resulting in one
pixel of the windowdecoration still showing. Really ugly.
Workaround. After querying X for the viewport location, round the
viewport X up to a multiple of 8 and move the window along the X axis
by the difference between the unrounded and rounded X. The attached
patch does this and works nicely for me.
Regards,
Hans
Please CC me directly on any replies as I'm not subscribed to the list.
I've encountered the following problem with clanlib when using openGL in
fullscreen mode:
1) When using metacity as a window manager changing the override
redirect flag after the window has been mapped once doesn't have any
effect, causing the window to still be managed by the wm. I assume
other wm's suffer from this too.
In general if you want to use override redirect you must set it
before the first mapping of the window, otherwise it will not
(always) work. I know that both SDL and allegro do this to make sure
override redirect works. (I wrote the current version of the allegro
fullscreen code).
2) So we have a still windowmanaged window, not really a problem as it
has the exact resolution of an available mode and we are going to
grab the mouse constraining it to our window, switch to this mode and
set the viewport to our window, so no-one will notice the decorations
3) Problem the decoration is 5 pixels wide and the wm ususally will
decide to place such a large window at 0,0 as we requested, so the
viewport will have to start at an x coordinate of 5, however not all
cards allow setting the viewport x coordinate to an pixel exact
value. For example my radeon 9800 with opensource dri drivers sets
the viewport to start (x) at 4 when you ask for 5 resulting in one
pixel of the windowdecoration still showing. Really ugly.
Workaround. After querying X for the viewport location, round the
viewport X up to a multiple of 8 and move the window along the X axis
by the difference between the unrounded and rounded X. The attached
patch does this and works nicely for me.
Regards,
Hans