[PATCH 2/2] Notify clients on mode_switch()

Hardening rdp.effort at gmail.com
Fri Sep 13 15:42:59 PDT 2013


Le 13/09/2013 18:21, Jason Ekstrand a écrit :
> I'll try to recap IRC.
>
> There is an error in the way you implemented weston_switch_mode in the
> following scenario:  A client sets a fullscreen surface at the same
> resolution and refresh rate as the "native" mode.  After this, a native
> mode switch occurs for some reason.  Because origin_mode == native_mode,
> your implementation will not detect the fullscreen surface and will
> mode-switch out from under the client.  My recommendation would be to
> use origin_mode != NULL to indicate that the current mode is temporary.
>
> Also, I think it would be better to call it MODE_SWITCH_SET_TEMPORARY
> rather than MODE_SWITCH_SET_FULLSCREEN.  The former is more descriptive
> of what is actually happening to the output and the latter is highly
> wl_shell dependent (there may be temporary switches that are not caused
> by a fullscreen surface).
>

Hi Jason,
good catch, I will change that way, and will also rename 
MODE_SWITCH_SET_FULLSCREEN accordingly.

Best regards, Hardening.



More information about the wayland-devel mailing list