Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ozone / wayland / display.cc
index cf3a6b3..d3f1525 100644 (file)
@@ -162,20 +162,12 @@ WaylandDisplay::GetEGLSurfaceProperties(const int32* desired_list) {
 }
 
 void WaylandDisplay::SetWidgetState(unsigned w,
-                                    ui::WidgetState state,
-                                    unsigned width,
-                                    unsigned height) {
+                                    ui::WidgetState state) {
   switch (state) {
-    case ui::CREATE:
-    {
-      CreateAcceleratedSurface(w);
-      break;
-    }
     case ui::FULLSCREEN:
     {
       WaylandWindow* widget = GetWidget(w);
       widget->SetFullscreen();
-      widget->Resize(width, height);
       break;
     }
     case ui::MAXIMIZED:
@@ -194,7 +186,6 @@ void WaylandDisplay::SetWidgetState(unsigned w,
     {
       WaylandWindow* widget = GetWidget(w);
       widget->Restore();
-      widget->Resize(width, height);
       break;
     }
     case ui::ACTIVE:
@@ -204,8 +195,11 @@ void WaylandDisplay::SetWidgetState(unsigned w,
       NOTIMPLEMENTED() << " INACTIVE " << w;
       break;
     case ui::SHOW:
-      NOTIMPLEMENTED() << " SHOW " << w;
+    {
+      WaylandWindow* widget = GetWidget(w);
+      widget->Show();
       break;
+    }
     case ui::HIDE:
       NOTIMPLEMENTED() << " HIDE " << w;
       break;
@@ -225,12 +219,14 @@ void WaylandDisplay::SetWidgetCursor(int cursor_type) {
   primary_input_->SetCursorType(cursor_type);
 }
 
-void WaylandDisplay::SetWidgetAttributes(unsigned widget,
-                                         unsigned parent,
-                                         unsigned x,
-                                         unsigned y,
-                                         ui::WidgetType type) {
-  WaylandWindow* window = GetWidget(widget);
+void WaylandDisplay::CreateWidget(unsigned widget,
+                                  unsigned parent,
+                                  unsigned x,
+                                  unsigned y,
+                                  ui::WidgetType type) {
+  DCHECK(!GetWidget(widget));
+  WaylandWindow* window = CreateAcceleratedSurface(widget);
+
   WaylandWindow* parent_window = GetWidget(parent);
   DCHECK(window);
   switch (type) {