Bug 183645
Summary: | window <-> fullscreen switching sometimes failed | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Hans de Goede <hdegoede> | ||||||
Component: | allegro | Assignee: | Jindrich Novy <jnovy> | ||||||
Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | rawhide | CC: | extras-qa, pknirsch | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2006-03-02 14:35:14 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Hans de Goede
2006-03-02 14:30:58 UTC
Hans, could you please attach the patch here as well? I'm getting "500 - Internal Server Error" from sourceforge when trying to review the patch. Thanks. Created attachment 125542 [details]
Patch working around the described problems
As requested, the workaround patch, upstream has confirmed that this fixes it
on other machines then mine too (unlike a previous attempt).
Quoting upstream:
"I can confirm this seems to fix the problem. Do you think it's possible
to simply unmap the window though, instead of destroying it?
For 4.3, it would be nice to have a way to simply switch a window
between fullscreen/windowed, preserving things like an OpenGL context
attached to it. Also, with the resizeable windows we will have there,
this might be independent of a resolution change. So, sooner or later we
will need a better solution.
For now, I think the patch should be applied though, because it is an
improvement.
Of course, there's again the ABI issue with the changed struct - but
since the xwin struct already has variable members depending on
the ./confugure results, it shouldn't matter."
The ABI issue is probably a moot one, the xwin struct really should not be used
by other apps, as its platform specific.
And as said the struct even changes when changing ./configure flags. I could
put the problematic variable somewhere else then in the struct though, that
would fix it for sure.
Now the opengl stuff is more serious, I didn't think about that one. Do we have
allegrogl in extras?
So what do we do?
I just did a yum list 'allegro*' and we don't have allegrogl. I've been discussing this with upstream and I've come up with a patch I'll wait with applying it for a reaction from upstream, here is my latest entry in the upstream bug tracker: As discussed on the list I've been working on a solution using 3 windows: -fs_window (for fullscreen) -wm_window (window managed) -window (the real window) 2 of which will be created in _xiwn_create_window: wm_window and window. The fullscreen window gets (re)created when needed, because reusing it causes the same trouble again. The real window uses wm_window as parent initially and will be reparened to the (freshly created) fullscreen window when requested and reparented back again in screen_destroy. Idea / concept of 3 windows borrowed from SDL. But somehow SDL manages to reuse the fullscreen window too. This patch also adds: -support for fullscreen without the XF86VM extension (I believe xgfxdrv.c needs updating for this too, untested) -support for not available resolutions in fullscreen, it chooses the smallest bigger mode and centers the graphics -gets completly rid of the center window patch that was disabled because of WindowMaker trouble this should no longer be needed, see comments in the patch. -integrates xwin_resize_window into xwin_create_window the code was wrong for seperate resize and it wasn't use anywhere else. Resizing a toplevel window will only send a resize request to the window manager, since our hints say we're not resizable the window manager will ignore this request, resulting in nothing happening. The unmap might have helped here but we were mapping the window again before changing the hints. when testing resizing code for xmame I've even been able to resize a window by just setting the hints, the way which always works which I found for xmame is: *set hints to resizable *XResizeWindow *set hints to fixed new size Created attachment 125630 [details]
Patch fixing the described problems using the 3 window solution
Upstream likes my second fix and will apply it to their tree, I'm applying it to our tree, together with a fix for the i386 assembler on processors with NX protection. |