We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 610 - Window resize problems with some window managers on X
Summary: Window resize problems with some window managers on X
Status: RESOLVED WONTFIX
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 1.2.11
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-10 10:23 UTC by weyer
Modified: 2009-09-21 01:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description weyer 2008-08-10 10:23:28 UTC
When my SDL window gets a resize event from the window
manager, I have to (if I understand it correctly) make a call
to set_video_mode with the new resolution. It seems that
this in turn sends some event to the window manager.

On some window managers, this causes problems.
This happens, when the window resize is done by a mouse
drag after clicking on the window corner. It only happens
with window managers that attempt to resize continously
throughout the dragging and then not with all of them.

With fvwm and qvwm, the problem is that the window
manager remembers the resize events from set_video_mode
and feeds them back to the SDL window after the dragging
is complete. (Or so I believe.)
With jwm, it is impossible to resize SDL windows.

I assume it is a design flaw in SDL, that set_video_mode
is needed to *respond* to a resize event.

OS: Debian etch on an AMD64
SDL version: 1.2.11, according to Debian

Here is a sample ocaml program that shows the bug.
(But I assume you don't need it.)

;;

Sdl.init_subsystem [`VIDEO];
Sdlevent.enable_events Sdlevent.videoresize_mask;

let window = ref (Sdlvideo.set_video_mode 1200 900 [`RESIZABLE])  in

while true do
  Sdlevent.pump ();
  match Sdlevent.poll () with
  | Some Sdlevent.VIDEORESIZE (w,h) ->
    window := Sdlvideo.set_video_mode w h [`RESIZABLE]
  | _ -> ();
done
Comment 1 Sam Lantinga 2009-09-21 01:56:18 UTC
SDL 1.3 has been rewritten to make it easier to handle these sorts of issues.
Can you check to see if this is a problem there and enter a new bug for SDL 1.3 if that's the case?
http://www.libsdl.org/tmp/SDL-1.3.zip

Thanks!