Bug 697593 - [PATCH] gl: implement fullscreen support
Summary: [PATCH] gl: implement fullscreen support
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: apps (show other bugs)
Version: master
Hardware: PC Linux
: P4 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-18 06:05 UTC by tuncerayaz
Modified: 2017-03-19 16:11 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
[PATCH] gl: implement fullscreen support (2.67 KB, patch)
2017-02-18 06:05 UTC, tuncerayaz
Details | Diff
[PATCH] gl: implement fullscreen support (2.81 KB, patch)
2017-03-01 21:43 UTC, tuncerayaz
Details | Diff
[PATCH] gl: implement fullscreen support (2.81 KB, patch)
2017-03-01 21:48 UTC, tuncerayaz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tuncerayaz 2017-02-18 06:05:10 UTC
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.
Comment 1 tuncerayaz 2017-02-18 06:10:37 UTC
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.
Comment 2 tuncerayaz 2017-02-24 14:35:24 UTC
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.
Comment 3 tuncerayaz 2017-03-01 15:59:05 UTC
No surprise, but I've confirmed that the patch also works with FVWM.
Comment 4 tuncerayaz 2017-03-01 21:43:04 UTC
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.
Comment 5 tuncerayaz 2017-03-01 21:46:15 UTC
(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.
Comment 6 tuncerayaz 2017-03-01 21:48:36 UTC
Created attachment 13448 [details]
[PATCH] gl: implement fullscreen support

Here's an updated patch without egl_context.c GLFW_SRC_UNUSED.