Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / ozone / wayland / shell / shell_surface.cc
index b38b27b..24adbba 100644 (file)
@@ -52,4 +52,26 @@ void WaylandShellSurface::WindowResized(void* data,
   dispatcher->WindowResized(window->Handle(), width, height);
 }
 
+void WaylandShellSurface::WindowActivated(void *data) {
+  WaylandWindow *window = static_cast<WaylandWindow*>(data);
+  WaylandShellSurface* shellSurface = window->ShellSurface();
+
+  ui::EventConverterOzoneWayland* dispatcher =
+    ui::EventFactoryOzoneWayland::GetInstance()->EventConverter();
+
+  if (shellSurface->IsMinimized()) {
+    shellSurface->Unminimize();
+    dispatcher->WindowUnminimized(window->Handle());
+  } else {
+    dispatcher->WindowActivated(window->Handle());
+  }
+}
+
+void WaylandShellSurface::WindowDeActivated(void *data) {
+  WaylandWindow *window = static_cast<WaylandWindow*>(data);
+  ui::EventConverterOzoneWayland* dispatcher =
+    ui::EventFactoryOzoneWayland::GetInstance()->EventConverter();
+  dispatcher->WindowDeActivated(window->Handle());
+}
+
 }  // namespace ozonewayland