Problem OpenGL + KDE maximize (Linux)

Hi,
in another thread the last days I wrote that SDL + OpenGL + KDE has a
problem, can someone confirm this:

When you resize your window with mouse everything works fine. Once
pressing on ‘maximize’ the window gets maximized, but you never restore it
to the previous state by pressing the ‘maximize’ button again. No problem
on Gnome windowmanager, but on KDE it fails.

You find a sample source code here (from NeHe’s OpenGL Tutorials):
http://nehe.gamedev.net/tutorials/linuxsdl/lesson06.tar.gz--
Mark “Moak” Seuffert, Pirates Technologies, http://www.pirate.de

The problem is the kde’s window manager, there isn’t a simple solution
for this.
There are many programs that have the same problem with kde.

El dc, 21-11-2001 a las 14:04, Mark Seuffert (Pirates) escribi?:

Hi,
in another thread the last days I wrote that SDL + OpenGL + KDE has a 
problem, can someone confirm this:

When you resize your window with mouse everything works fine. Once 
pressing on 'maximize' the window gets maximized, but you never restore it 
to the previous state by pressing the 'maximize' button again. No problem 
on Gnome windowmanager, but on KDE it fails.

You find a sample source code here (from NeHe's OpenGL Tutorials):
http://nehe.gamedev.net/tutorials/linuxsdl/lesson06.tar.gz-- 
Mark "Moak" Seuffert, Pirates Technologies, http://www.pirate.de

_______________________________________________
SDL mailing list
SDL at libsdl.org

http://www.libsdl.org/mailman/listinfo/sdl

samsaga2 wrote:

The problem is the kde’s window manager, there isn’t a simple solution
for this.
There are many programs that have the same problem with kde.

I too have a program that has big problems with the KDE WM, basically
that the WM does not honor the WMHints; windows that should be
fixed-size can be resized by mouse, stuff like that. I’ll take even a
complicated solution!

What (if any) is the URL for the KDE development mailing list(s) ?

Greetings,–
Michel Bardiaux
Peaktime Belgium S.A. Rue Margot, 37 B-1457 Nil St Vincent
Tel : +32 10 65.44.15 Fax : +32 10 65.44.10

Dunno about the rest, but the problem with that nehe code is that it calls
SDL_SetVideoMode in the resize event. The resize event is also called at
window maximizing - so, when maximizing, you actually resize the window, as
well as maximizing it. This of course means that it’s not possible to restore
the window, since it is resized to the maximized size …

Anyway, i see no reason at all for having that SDL_SetVideoMode call in the
resize event … So, remove that, and live happily ever after (as far as
possible with nehe =)On Wednesday 21. November 2001 14:04, Mark Seuffert (Pirates) wrote:

Hi,
in another thread the last days I wrote that SDL + OpenGL + KDE has a
problem, can someone confirm this:

When you resize your window with mouse everything works fine. Once
pressing on ‘maximize’ the window gets maximized, but you never restore it
to the previous state by pressing the ‘maximize’ button again. No problem
on Gnome windowmanager, but on KDE it fails.

You find a sample source code here (from NeHe’s OpenGL Tutorials):
http://nehe.gamedev.net/tutorials/linuxsdl/lesson06.tar.gz


Trick


Linux User #229006 * http://counter.li.org

“There is no magic.” - Nakor, magician.

Dunno about the rest, but the problem with that nehe code is that it calls
SDL_SetVideoMode in the resize event. The resize event is also called at
window maximizing - so, when maximizing, you actually resize the window, as
well as maximizing it. This of course means that it’s not possible to restore
the window, since it is resized to the maximized size …

Anyway, i see no reason at all for having that SDL_SetVideoMode call in the
resize event … So, remove that, and live happily ever after (as far as
possible with nehe =)

That’s an interesting thought. In 2D mode, you need to set the video mode
in response to the resize message to make sure the internal framebuffer is
synchronized with the actual window dimensions. I’m not sure if this is
necessary in 3D mode.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hai Sam!

Sam Lantinga schrieb am 22 Nov 2001, (you wrote):

Anyway, i see no reason at all for having that SDL_SetVideoMode call in
the resize event … So, remove that, and live happily ever after (as far
as possible with nehe =)

That’s an interesting thought. In 2D mode, you need to set the video mode
in response to the resize message to make sure the internal framebuffer is
synchronized with the actual window dimensions. I’m not sure if this is
necessary in 3D mode.

It is. I tried without and the result is something, hmm something you
don’t want. Other windowmanagers have no problem with SDL. I’m sorry, but
my xlib knowledge is close to zero, so I have no idea where to patch SDL.
:)–
Mark “Moak” Seuffert, Pirates Technologies, http://www.pirate.de

That’s an interesting thought. In 2D mode, you need to set the video mode
in response to the resize message to make sure the internal framebuffer is
synchronized with the actual window dimensions. I’m not sure if this is
necessary in 3D mode.

It is. I tried without and the result is something, hmm something you
don’t want. Other windowmanagers have no problem with SDL. I’m sorry, but
my xlib knowledge is close to zero, so I have no idea where to patch SDL.
:slight_smile:

Hmm, KDE is broken in several other ways as well. I’d recommend just
upgrading when the new version comes out, or switching to GNOME.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment