display-dpms: use get_state listener to get get_dpms request event 89/217089/2 accepted/tizen/unified/20191112.034025 submit/tizen/20191111.071211
authorJunkyeong Kim <jk0430.kim@samsung.com>
Wed, 6 Nov 2019 07:31:14 +0000 (16:31 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 11 Nov 2019 05:43:39 +0000 (05:43 +0000)
Change-Id: Iae31d9d3d95fcdd6c886c3be5988d7b19759bc72
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/display/display-dpms.c

index ef62f03..1705b63 100644 (file)
@@ -46,9 +46,15 @@ bool wm_is_ready;
 static bool dpms_connected;
 static GSource *wl_glib_data = NULL;
 
-static void dpms_handle_state(void *data, struct tizen_dpms_manager *tz_dpms, uint32_t mode, uint32_t error)
+static void dpms_handle_set_state(void *data, struct tizen_dpms_manager *tz_dpms, uint32_t mode, uint32_t error)
 {
-       _D("Dpms_state_cb - mode:%u, error:%u", mode, error);
+       _D("Dpms_state_cb set - mode:%u, error:%u", mode, error);
+       info->dpms_mode = mode;
+}
+
+static void dpms_handle_get_state(void *data, struct tizen_dpms_manager *tz_dpms, uint32_t mode, uint32_t error)
+{
+       _D("Dpms_state_cb get - mode:%u, error:%u", mode, error);
        info->dpms_mode = mode;
 }
 
@@ -88,7 +94,8 @@ void disconnect_interface_with_dpms(void)
 }
 
 static const struct tizen_dpms_manager_listener dpms_listener = {
-       dpms_handle_state
+       dpms_handle_set_state,
+       dpms_handle_get_state
 };
 
 static void handle_global(void *data, struct wl_registry *registry,