system-controller: support for full-screen layer
authorJanos Kovacs <jankovac503@gmail.com>
Wed, 12 Mar 2014 16:45:35 +0000 (18:45 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:15 +0000 (18:37 +0200)
Change-Id: I289ffa9e1659416cece19e1eb60894f0701dba3c

packaging.in/murphy.lua
src/plugins/system-controller/wayland/ico-window-manager.c
src/plugins/system-controller/wayland/layer.c
src/plugins/system-controller/wayland/layer.h

index 124ca73..b2c4c91 100644 (file)
@@ -751,6 +751,17 @@ input_layer = {
    [5] = true  -- cursor
 }
 
+-- some day this should be merged with wmgr.layers
+ico_layer_type = {
+   [1] = 0x1000, -- background
+   [2] = 0x2000, -- application
+   [3] = 0x4000, -- input
+   [4] = 0xa000, -- touch
+   [5] = 0xb000, -- cursor
+   [6] = 0xc000, -- startup
+   [7] = 0x3000  -- fullscreen
+}
+
 resmgr = resource_manager {
   screen_event_handler = function(self, ev)
                              local event = ev.event
@@ -1026,7 +1037,7 @@ wmgr = window_manager {
              {    103, "Startup"      , 6 },
              { 0x1000, "Background"   , 1 },
              { 0x2000, "Normal"       , 2 },
-             { 0x3000, "Fullscreen"   , 2 },
+             { 0x3000, "Fullscreen"   , 7 },
              { 0x4000, "InputPanel"   , 3 },
              { 0xA000, "Touch"        , 4 },
              { 0xB000, "Cursor"       , 5 },
@@ -1085,9 +1096,13 @@ wmgr = window_manager {
                       elseif oper == 3 then  -- namechange
                            command     = 0x10009
                       elseif oper == 4 or oper == 5 then --visible or configure
+                           local icolayer = ico_layer_type[win.layertype]
                            command     = 0x10008
                            arg.zone    = win.area
                            arg.node    = win.node
+                           if icolayer then
+                               arg.layertype = icolayer
+                           end
                            arg.layer   = win.layer
                            arg.pos_x   = win.pos_x
                            arg.pos_y   = win.pos_y
@@ -1104,10 +1119,10 @@ wmgr = window_manager {
                            if not map then
                                return
                            end
-                           if win.mapped then
-                               command = 0x10011
-                           else
+                           if win.mapped == 0 then
                                command = 0x10012
+                           else
+                               command = 0x10011
                            end
                            arg.attr = map.type
                            arg.name = map.target
index 0c02b5f..ea42aca 100644 (file)
@@ -1107,6 +1107,8 @@ static mrp_wayland_layer_type_t get_layer_type(uint32_t layertype)
         return MRP_WAYLAND_LAYER_BACKGROUND;
 
     case ICO_WINDOW_MGR_LAYERTYPE_FULLSCREEN:
+        return MRP_WAYLAND_LAYER_FULLSCREEN;
+
     case ICO_WINDOW_MGR_LAYERTYPE_NORMAL:
         return MRP_WAYLAND_LAYER_APPLICATION;
 
index c8e5185..a5e65e4 100644 (file)
@@ -255,6 +255,7 @@ const char *mrp_wayland_layer_type_str(mrp_wayland_layer_type_t type)
     case MRP_WAYLAND_LAYER_TOUCH:        return "touch";
     case MRP_WAYLAND_LAYER_CURSOR:       return "cursor";
     case MRP_WAYLAND_LAYER_STARTUP:      return "startup";
+    case MRP_WAYLAND_LAYER_FULLSCREEN:   return "fullscreen";
     default:                             return "<unknown>";
     }
 }
index 5dc783d..d6e7c11 100644 (file)
@@ -42,6 +42,7 @@ enum mrp_wayland_layer_type_e {
     MRP_WAYLAND_LAYER_TOUCH,       /* 4 */
     MRP_WAYLAND_LAYER_CURSOR,      /* 5 */
     MRP_WAYLAND_LAYER_STARTUP,     /* 6 */
+    MRP_WAYLAND_LAYER_FULLSCREEN,  /* 7 */
 
     MRP_WAYLAND_LAYER_TYPE_MAX
 };