discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=f92e241e8edbe221b3985308bf4ed7e6660f02bd

commit f92e241e8edbe221b3985308bf4ed7e6660f02bd
Author: Bryce Harrington <[email protected]>
Date:   Fri Feb 27 19:45:24 2015 -0500

    wayland: Make sure we're initializing output scale sensibly
    
    Summary:
    By default the E_NEW() will create our output objects with a 0.0 scale,
    which doesn't make any sense and if anything will lead to crashes.
    Instead use a scale factor of 1.0.
    
    When updating output details, if the scale setting is invalid then set
    it to 1.0 as a sensible value.
    
    Note this doesn't actually enable scaling, just helps make sure we're
    not injecting invalid scale parameters from the start.
    
    Reviewers: zmike, devilhorns, cedric
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2078
---
 src/bin/e_comp_wl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 43b0e30..6e72a53 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2793,6 +2793,7 @@ e_comp_wl_output_init(const char *id, const char *make, 
const char *model, int x
         output->global = wl_global_create(cdata->wl.disp, &wl_output_interface,
                                           2, output, 
_e_comp_wl_cb_output_bind);
         output->resources = NULL;
+        output->scale = 1.0;
      }
 
    /* update the output details */
@@ -2806,6 +2807,9 @@ e_comp_wl_output_init(const char *id, const char *make, 
const char *model, int x
    output->subpixel = subpixel;
    output->transform = transform;
 
+   if (output->scale <= 0)
+     output->scale = 1.0;
+
    /* if we have bound resources, send updates */
    EINA_LIST_FOREACH(output->resources, l2, resource)
      {

-- 


Reply via email to