ecore-wl2: remove maximized/fullscreen/transient from window types enum
authorMike Blumenkrantz <zmike@osg.samsung.com>
Wed, 6 Apr 2016 20:48:58 +0000 (16:48 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 7 Apr 2016 18:19:25 +0000 (14:19 -0400)
these aren't real window types and only complicate internals/api

 #hoorayforbeta

src/lib/ecore_wl2/Ecore_Wl2.h
src/lib/ecore_wl2/ecore_wl2_window.c

index a31fee7..b97faad 100644 (file)
@@ -137,9 +137,6 @@ typedef enum _Ecore_Wl2_Window_Type
 {
    ECORE_WL2_WINDOW_TYPE_NONE,
    ECORE_WL2_WINDOW_TYPE_TOPLEVEL,
-   ECORE_WL2_WINDOW_TYPE_FULLSCREEN,
-   ECORE_WL2_WINDOW_TYPE_MAXIMIZED,
-   ECORE_WL2_WINDOW_TYPE_TRANSIENT,
    ECORE_WL2_WINDOW_TYPE_MENU,
    ECORE_WL2_WINDOW_TYPE_DND,
    ECORE_WL2_WINDOW_TYPE_CUSTOM,
index 1de96d3..dc35de0 100644 (file)
@@ -141,28 +141,6 @@ _ecore_wl2_window_type_set(Ecore_Wl2_Window *win)
 {
    switch (win->type)
      {
-      case ECORE_WL2_WINDOW_TYPE_FULLSCREEN:
-        if (win->xdg_surface)
-          xdg_surface_set_fullscreen(win->xdg_surface, NULL);
-        else if (win->wl_shell_surface)
-          wl_shell_surface_set_fullscreen(win->wl_shell_surface,
-                                          WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
-                                          0, NULL);
-        break;
-      case ECORE_WL2_WINDOW_TYPE_MAXIMIZED:
-        if (win->xdg_surface)
-          xdg_surface_set_maximized(win->xdg_surface);
-        else if (win->wl_shell_surface)
-          wl_shell_surface_set_maximized(win->wl_shell_surface, NULL);
-        break;
-      case ECORE_WL2_WINDOW_TYPE_TRANSIENT:
-        if (win->xdg_surface)
-          xdg_surface_set_parent(win->xdg_surface, win->parent->xdg_surface);
-        else if (win->wl_shell_surface)
-          wl_shell_surface_set_transient(win->wl_shell_surface,
-                                         win->parent->surface,
-                                         win->geometry.x, win->geometry.y, 0);
-        break;
       case ECORE_WL2_WINDOW_TYPE_MENU:
           {
              Ecore_Wl2_Input *input;
@@ -700,8 +678,6 @@ ecore_wl2_window_maximized_set(Ecore_Wl2_Window *window, Eina_Bool maximized)
           xdg_surface_set_maximized(window->xdg_surface);
         else if (window->wl_shell_surface)
           wl_shell_surface_set_maximized(window->wl_shell_surface, NULL);
-
-        window->type = ECORE_WL2_WINDOW_TYPE_MAXIMIZED;
      }
    else
      {
@@ -710,8 +686,6 @@ ecore_wl2_window_maximized_set(Ecore_Wl2_Window *window, Eina_Bool maximized)
         else if (window->wl_shell_surface)
           wl_shell_surface_set_toplevel(window->wl_shell_surface);
 
-        window->type = ECORE_WL2_WINDOW_TYPE_TOPLEVEL;
-
         _ecore_wl2_window_configure_send(window, window->saved.w,
                                          window->saved.h, 0);
      }
@@ -748,8 +722,6 @@ ecore_wl2_window_fullscreen_set(Ecore_Wl2_Window *window, Eina_Bool fullscreen)
           wl_shell_surface_set_fullscreen(window->wl_shell_surface,
                                           WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
                                           0, NULL);
-
-        window->type = ECORE_WL2_WINDOW_TYPE_FULLSCREEN;
      }
    else
      {
@@ -758,8 +730,6 @@ ecore_wl2_window_fullscreen_set(Ecore_Wl2_Window *window, Eina_Bool fullscreen)
         else if (window->wl_shell_surface)
           wl_shell_surface_set_toplevel(window->wl_shell_surface);
 
-        window->type = ECORE_WL2_WINDOW_TYPE_TOPLEVEL;
-
         _ecore_wl2_window_configure_send(window, window->saved.w,
                                          window->saved.h, 0);
      }
@@ -879,8 +849,6 @@ ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool iconified)
                                        &states, 0);
              wl_array_release(&states);
           }
-
-        window->type = ECORE_WL2_WINDOW_TYPE_TOPLEVEL;
      }
 }