Skip to content

Commit f0898f8

Browse files
committed
gfxlib2: fix linux GFX_NO_FRAME + GFX_OPENGL freezing at exit
- freezing due to dead lock between exit routines - driver was waiting on window thread to exit, but window thread waiting on client frame to unmap - resolves github issue # 122 (cherry picked from commit 59af0f0) # Conflicts: # changelog.txt
1 parent 39ef43f commit f0898f8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Version 1.07.2
1616
- sf.net #921: gfxlib: horizontal line drawing on 8-bit image was using wrong bpp
1717
- github #258: on windows directx and gdi drivers, only show window after intialization is complete (adeyblue)
1818
- sf.net #925: CSIGN/CUNSG preserve size when converting pointers on 64-bit and implict conversion of STEP value in FOR...NEXT statement
19+
- github #122: gfxlib2: linux GFX_NO_FRAME + GFX_OPENGL freezing at exit due to a dead lock between exit routines
1920

2021

2122
Version 1.07.1

src/gfxlib2/unix/gfx_driver_opengl_x11.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,12 @@ static void opengl_window_exit(void)
111111
fb_hX11WaitUnmapped(fb_x11.window);
112112
if (fb_x11.flags & DRIVER_FULLSCREEN) {
113113
XUnmapWindow(fb_x11.display, fb_x11.fswindow);
114-
XSync(fb_x11.display, False);
114+
XSync(fb_x11.display, False);
115115
} else {
116-
XUnmapWindow(fb_x11.display, fb_x11.wmwindow);
117-
fb_hX11WaitUnmapped(fb_x11.wmwindow);
116+
if( !(fb_x11.flags & DRIVER_NO_FRAME) ) {
117+
XUnmapWindow(fb_x11.display, fb_x11.wmwindow);
118+
fb_hX11WaitUnmapped(fb_x11.wmwindow);
119+
}
118120
}
119121
//usleep(500);
120122
XSync(fb_x11.display, False);

0 commit comments

Comments
 (0)