Bug 7160 - Adding or removing a monitor in fullscreen on macOS results in black screen(s)
: Adding or removing a monitor in fullscreen on macOS results in black screen(s)
Status: NEW
: ThinLinc
: trunk
: Macintosh macOS
: P2 Normal
: MediumPrio
Assigned To:
: 7007
  Show dependency treegraph
Reported: 2018-04-23 15:00 by
Modified: 2018-09-12 08:52 (History)
Acceptance Criteria:



You need to log in before you can comment on or make changes to this bug.

Description From cendio 2018-04-23 15:00:44
Adding or removing a monitor in fullscreen mode on our 10.13.3 machine results
in completely black screens. It is possible to recover by pressing "F8, down,
Enter", so apparently vncviewer still runs. 

The problem has been verified with ThinLinc client build 5702, as well as my
manual vncviewer build of upstream TigerVNC (including patches for bug 7007).

I think it makes sense to try fixing bug 6116 and see if that improves things.
------- Comment #1 From cendio 2018-04-24 11:57:32 -------
Apparently "impossible":

------- Comment #2 From cendio 2018-04-24 15:15:27 -------
This problem only happens when using "Send system keys", ie keyboard grabbing.
Also, in our lab, it only happens on the 10.13 machine; not on 10.6. 

I've tried various methods to detect if a screen has been connected or
disconnected, without success. The number of screens stays the same
(CGGetActiveDisplayList). The window "level" is the same. No interesting events
delivered, as far as I can tell.
------- Comment #3 From cendio 2018-04-24 21:50:03 -------
Tested on 10.12.4:

The screen does not turn black. However, the client is not notified of the
screen change (not even with patches; FL_SCREEN_CONFIGURATION_CHANGED is not
generated). This means:

* If a second monitor is removed, the ThinLinc session will continue to think
that there are two monitors.

* If a second monitor is added, macOS will not even start using it, until
fullscreen mode is exited. (The monitor blinks in power save mode.)

(Apparently, when in fullscreen mode and using captured displays, everything is
"locked". I even checked with "system_profiler SPDisplaysDataType": The output
shows that the second monitor is online, even after pulling the connector. It
is not until fullscreen mode is exited that the data is updated.)
------- Comment #4 From cendio 2018-05-09 13:16:32 -------
We could explore using an alternative method of grabbing the keyboard. See bug
4660 for one such method.
------- Comment #5 From cendio 2018-09-12 08:52:28 -------
*** Bug 7248 has been marked as a duplicate of this bug. ***