e_randr2: always apply even if there is no configured screens we have.
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 21 Jan 2016 06:43:26 +0000 (15:43 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Thu, 21 Jan 2016 07:20:13 +0000 (16:20 +0900)
Change-Id: I6a67d729a51a6f985168eac7bf18592a4ad52e72

src/bin/e_randr2.c

index a2880c24514530b4f933a96f3a848ec42783fa6d..76b54419696df682f8e340cc3652cee7d1e99013 100644 (file)
@@ -84,18 +84,16 @@ e_randr2_init(void)
    _screen_config_maxsize();
    // load config and apply it
    e_randr2_cfg = _config_load();
-   // only apply if restore is set AND at least one configured screen
-   // matches one we have
-   if ((e_randr2_cfg->restore) &&
-       (_config_screen_match_count(e_randr2, e_randr2_cfg) > 0))
-     {
-        _do_apply();
-     }
-   else
+   // update config
+   if ((!e_randr2_cfg->restore) ||
+       (_config_screen_match_count(e_randr2, e_randr2_cfg) == 0))
      {
         _config_update(e_randr2, e_randr2_cfg);
         e_randr2_config_save();
      }
+
+   _do_apply();
+
    ecore_event_add(E_EVENT_RANDR_CHANGE, NULL, NULL, NULL);
    return EINA_TRUE;
 }