| Summary: | Window resize problems with some window managers on X | ||
|---|---|---|---|
| Product: | SDL | Reporter: | weyer |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.2.11 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
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! |
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