The size of PD is unable to fixed to the width of device
authorleerang song <leerang.song@samsung.com>
Thu, 27 Jun 2013 02:53:30 +0000 (11:53 +0900)
committerleerang song <leerang.song@samsung.com>
Thu, 27 Jun 2013 06:26:16 +0000 (15:26 +0900)
[Issue#] TDIS-6136
[Problem] The size of PD is unable to fixed to the width of device
[Cause] web-provider use the default PD width instaead of screen width.
[Solution] Use the screen-width getting from the eccore_x_window_size_get API

Change-Id: Ie02b26d6204d6cae82ebc4682584fb231a47dfcb

src/Daemon/BoxDaemonImpl.cpp

index 47dda06..d88e0c1 100755 (executable)
@@ -228,8 +228,8 @@ int BoxDaemonImpl::pdCreateCallback(ProviderEventArgPtr arg, void* data)
     if (arg->info.pd_create.w == 0 || arg->info.pd_create.h == 0) {
         return -1;
     }
-
-    info->pdWidth = arg->info.pd_create.w;
+    //Use the screen width to fix the device width
+    ecore_x_window_size_get(0, &info->pdWidth, NULL);
     info->pdHeight = arg->info.pd_create.h;
     info->pdX = arg->info.pd_create.x;
     info->pdY = arg->info.pd_create.y;