[PATCH 04/10] compositor-drm: Allow weston_output_mode_switch_to_native() to work.

Bryce Harrington bryce at osg.samsung.com
Tue Jun 30 12:23:35 PDT 2015


On Mon, Jun 22, 2015 at 10:08:04AM -0500, Derek Foreman wrote:
> Reviewed-By: Derek Foreman <derekf at osg.samsung.com>

Thanks, pushed:

To ssh://git.freedesktop.org/git/wayland/weston
   872797c..8081704  master -> master

 
> On 21/06/15 02:25 PM, Mario Kleiner wrote:
> > Initialize output->native_mode with the initially chosen
> > mode for an output, so weston_output_mode_switch_to_native()
> > has something to work with and can switch back from temporary
> > selected modes to the outputs native mode. Before, this was a
> > no-op.
> > 
> > This allows an output to switch back to its default mode if
> > a former toplevel fullscreen shell surface created via method
> > WL_SHELL_SURFACE_FULLSCREEN_METHOD_DRIVER gets destroyed, or
> > it gets demoted to non-fullscreen, or if modesetting on the
> > output failed for some reason.
> > 
> > v2: Modified and split into a separate patch from original
> >     patch "Allow restore_output_mode() to work properly.",
> >     as suggested by Derek Foreman.
> > 
> > Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
> > Cc: Derek Foreman <derekf at osg.samsung.com>
> > ---
> >  src/compositor-drm.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/src/compositor-drm.c b/src/compositor-drm.c
> > index 58b2e5a..ad70807 100644
> > --- a/src/compositor-drm.c
> > +++ b/src/compositor-drm.c
> > @@ -2202,6 +2202,10 @@ create_output_for_connector(struct drm_compositor *ec,
> >  				    connector->count_modes == 0 ?
> >  				    ", built-in" : "");
> >  
> > +	/* Set native_ fields, so weston_output_mode_switch_to_native() works */
> > +	output->base.native_mode = output->base.current_mode;
> > +	output->base.native_scale = output->base.current_scale;
> > +
> >  	return 0;
> >  
> >  err_output:
> > 
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list