Bug 770 - NEWT/X11 Fullscreen: _NET_WM_STATE_FULLSCREEN may result in ConfigureNotify event w/ virtual screen size, instead of monitor-mode size (NV + Fglrx)
Summary: NEWT/X11 Fullscreen: _NET_WM_STATE_FULLSCREEN may result in ConfigureNotify e...
Status: RESOLVED FIXED
Alias: None
Product: Newt
Classification: JogAmp
Component: x11 (show other bugs)
Version: 1
Hardware: All linux
: --- major
Assignee: Sven Gothel
URL:
Depends on:
Blocks: 771
  Show dependency treegraph
 
Reported: 2013-06-30 17:14 CEST by Sven Gothel
Modified: 2015-06-20 16:34 CEST (History)
0 users

See Also:
Type: ---
SCM Refs:
205a17de1abec614d3d06386f873170fc1691e86 fa6e868a72b8fb3de8c96afbd71ab4d3ad33f6b6
Workaround: ---


Attachments
attach (5.55 KB, text/html)
2015-06-20 16:34 CEST, stiv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2013-06-30 17:14:09 CEST
_NET_WM_STATE_FULLSCREEN may result in ConfigureNotify event w/ virtual screen size, instead of monitor-mode size (NV + Fglrx).

ConfigureNotify reflects the actual size of the window and is being propagated
to NEWT and the GLEventListener.

+++

With Mesa/Intel open-source driver, the correct desired monitor mode size is reported
at least on one test machine here.

Remedy is to not use _NET_WM_STATE_FULLSCREEN, but fallback 
to our 'FLAG_IS_FULLSCREEN_SPAN' path - simply setting the window's:
  - size and position
  -  _NET_WM_STATE_ABOVE
  - decoration
  - ..

.. while doing so, we _shall_ set the new EWMH property 
   _NET_WM_BYPASS_COMPOSITOR
synchronous to _NET_WM_STATE_ABOVE.
Comment 1 Sven Gothel 2013-06-30 19:37:43 CEST
Further more .. to deal w/ an occupying  task bar etc, i.e. to be above other WM elements,
we would need to utilize _NET_WM_STATE_FLAG_ABOVE since _NET_WM_STATE_FULLSCREEN
is gone.

Since _NET_WM_STATE_FLAG_ABOVE would not allow to utilize TAB-Switch 
to another application, we shall only enable it temporarely during fullscreen
if not already requested by the NEWT window!

Note: The TAB-Switch will revoke the focus of our windows,
only to be returned if selected again.

Hence we need to break this temporary state if the window loses the focus
or ends fullscreen mode.
We may renable it while still in fullscreen mode and regaining the focus.
Comment 2 Sven Gothel 2013-06-30 19:40:01 CEST
(In reply to comment #1)
> Further more .. to deal w/ an occupying  task bar etc, i.e. to be above
> other WM elements,
> we would need to utilize _NET_WM_STATE_FLAG_ABOVE since
> _NET_WM_STATE_FULLSCREEN
> is gone.
> 
Temporary claim of _NET_WM_STATE_FLAG_ABOVE
will allow us to claim _NET_WM_BYPASS_COMPOSITOR as well ..!
Comment 3 Sven Gothel 2013-07-02 16:01:33 CEST
fixed .. following description and comments, see commit 205a17de1abec614d3d06386f873170fc1691e86.
Comment 4 Sven Gothel 2013-07-04 14:48:05 CEST
Only use FLAG_IS_FULLSCREEN_SPAN if required; At MonitoMode change, reset fullscreen if FLAG_IS_FULLSCREEN_SPAN is supported.
    
 - Bug 770: Only use FLAG_IS_FULLSCREEN_SPAN if required
    - If X11 WindowDriver _and_ virtual-screen-size > fullscreenViewport,
    - else we still use _NET_WM_STATE_FULLSCREEN on X11!
    
  - Bug 771: At MonitoMode change, reset fullscreen if FLAG_IS_FULLSCREEN_SPAN is supported
    - Since we may still use _NET_WM_STATE_FULLSCREEN on X11:
      - Pause fullscreen at monitorModeChangeNotify(..)
      - Resume fullscreen at monitorModeChanged(..)
Comment 5 stiv 2015-06-20 16:34:05 CEST
Created attachment 697 [details]
attach