Created attachment 13405 [details] [PATCH] gl: implement fullscreen support This patch reimplements fullscreen support after the switch to GLFW. I've tested it to work correctly under Weston, Fluxbox, WindowMaker, dwm, sway, of which two are Wayland compositors and one is a tiling X11 window manager. My primary environment (XMonad) has problems with the code, but it looks like a general GLFW/XMonad incompatibility. llpp's OpenGL fullscreen mode works under XMonad. Interestingly llpp's operation to enter fullscreen is slightly faster, but not by much. Please note that this requires a newer GLFW release (tested with vanilla 3.2.1). The submodule revision will need to be updated to point at an as of yet non-existing thirdparty-glfw.git branch upon merge. To that end, I've rebased the mupdf glfw fork, and you can pull master, latest, mupdf-fixes branches and tags from https://gitlab.com/tuncer/mupdf-thirdparty-glfw.
While incorporating the newer GLFW in Makethird, I've noticed that GLFW also has platform support for Wayland. The fullscreen support works as is under Wayland, but perhaps native Wayland GLFW drawing should be investigated for better integration and performance, given that Xwayland has many quirks.
In Makethird I didn't remove egl_context.c from GLFW_SRC_UNUSED, because the list may need to be updated with the 3.2 switch anyway, and I wanted to put only relevant changes in the patch.
No surprise, but I've confirmed that the patch also works with FVWM.
Created attachment 13447 [details] [PATCH] gl: implement fullscreen support Here's an updated patch that removes egl_context.c from GLFW_SRC_UNUSED and also uses DEFAULT_WINDOW_W and DEFAULT_WINDOW_H as initial values for the saved window dimensions.
(In reply to Tuncer Ayaz from comment #4) > Created attachment 13447 [details] > [PATCH] gl: implement fullscreen support > > Here's an updated patch that removes egl_context.c from GLFW_SRC_UNUSED and > also uses DEFAULT_WINDOW_W and DEFAULT_WINDOW_H as initial values for the > saved window dimensions. Which isn't available at that point. Reverting to DEFAULT_LAYOUT_W and DEFAULT_LAYOUT_H.
Created attachment 13448 [details] [PATCH] gl: implement fullscreen support Here's an updated patch without egl_context.c GLFW_SRC_UNUSED.
Patch merged: http://git.ghostscript.com/?p=mupdf.git;a=commit;h=d7a849bef3cb481060103fe444b62cdab5b0d274