discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=2485cbbd13ab1753f6e69bf8175af9f6f3abe18d

commit 2485cbbd13ab1753f6e69bf8175af9f6f3abe18d
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Jul 1 16:44:09 2015 -0400

    allow hint setting on x11 windows in xwayland
---
 src/bin/e_hints.c | 56 +++++++++++++++++++++++++++----------------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c
index 3b5cfeb..c9b90bd 100644
--- a/src/bin/e_hints.c
+++ b/src/bin/e_hints.c
@@ -404,7 +404,7 @@ e_hints_window_init(E_Client *ec)
 #else
    E_Remember *rem = NULL;
 
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if (ec->remember)
      rem = ec->remember;
 
@@ -582,7 +582,7 @@ e_hints_window_state_set(E_Client *ec)
    Ecore_X_Window_State state[10];
    int num = 0;
 
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if (ec->netwm.state.modal)
      state[num++] = ECORE_X_WINDOW_STATE_MODAL;
    if (ec->netwm.state.sticky)
@@ -642,7 +642,7 @@ e_hints_allowed_action_set(E_Client *ec)
    Ecore_X_Action action[10];
    int num = 0;
 
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if (ec->netwm.action.move)
      action[num++] = ECORE_X_ACTION_MOVE;
    if (ec->netwm.action.resize)
@@ -674,7 +674,7 @@ e_hints_window_type_set(E_Client *ec)
 #ifdef HAVE_WAYLAND_ONLY
    (void)ec;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    ecore_x_netwm_window_type_set(e_client_util_win_get(ec), ec->netwm.type);
 #endif
 }
@@ -688,7 +688,7 @@ e_hints_window_type_get(E_Client *ec)
    Ecore_X_Window_Type *types = NULL;
    int num, i, j;
 
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    num = ecore_x_netwm_window_types_get(e_client_util_win_get(ec), &types);
    if (ec->netwm.extra_types)
      {
@@ -732,7 +732,7 @@ e_hints_window_type_get(E_Client *ec)
 E_API void
 e_hints_window_state_update(E_Client *ec, int state, int action)
 {
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    switch (state)
      {
       case ECORE_X_WINDOW_STATE_ICONIFIED:
@@ -1003,7 +1003,7 @@ e_hints_window_state_get(E_Client *ec)
    unsigned int i, num;
    Ecore_X_Window_State *state;
 
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    ec->netwm.state.modal = 0;
    ec->netwm.state.sticky = 0;
    ec->netwm.state.maximized_v = 0;
@@ -1091,7 +1091,7 @@ e_hints_allowed_action_update(E_Client *ec, int action)
    (void)ec;
    (void)action;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    switch (action)
      {
       case ECORE_X_ACTION_MOVE:
@@ -1143,7 +1143,7 @@ e_hints_allowed_action_get(E_Client *ec)
    unsigned int i;
    unsigned int num;
 
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    ec->netwm.action.move = 0;
    ec->netwm.action.resize = 0;
    ec->netwm.action.minimize = 0;
@@ -1234,7 +1234,7 @@ e_hints_window_visible_set(E_Client *ec)
 #ifdef HAVE_WAYLAND_ONLY
    (void)ec;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_NORMAL)
      ec->icccm.state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
    ecore_x_icccm_state_set(e_client_util_win_get(ec), 
ECORE_X_WINDOW_STATE_HINT_NORMAL);
@@ -1254,7 +1254,7 @@ e_hints_window_iconic_set(E_Client *ec)
 #ifdef HAVE_WAYLAND_ONLY
    (void)ec;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_ICONIC)
      ec->icccm.state = ECORE_X_WINDOW_STATE_HINT_ICONIC;
    ecore_x_icccm_state_set(e_client_util_win_get(ec), 
ECORE_X_WINDOW_STATE_HINT_ICONIC);
@@ -1274,7 +1274,7 @@ e_hints_window_hidden_set(E_Client *ec)
 #ifdef HAVE_WAYLAND_ONLY
    (void)ec;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if (ec->icccm.state != ECORE_X_WINDOW_STATE_HINT_WITHDRAWN)
      ec->icccm.state = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
    ecore_x_icccm_state_set(e_client_util_win_get(ec), 
ECORE_X_WINDOW_STATE_HINT_WITHDRAWN);
@@ -1295,7 +1295,7 @@ e_hints_window_shaded_set(E_Client *ec, int on)
    (void)ec;
    (void)on;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if ((!ec->netwm.state.shaded) && (on))
      {
         ec->netwm.update.state = 1;
@@ -1323,7 +1323,7 @@ e_hints_window_shade_direction_set(E_Client *ec, 
E_Direction dir)
    (void)ec;
    (void)dir;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    ecore_x_window_prop_card32_set(e_client_util_win_get(ec), 
E_ATOM_SHADE_DIRECTION, &dir, 1);
 #endif
 }
@@ -1337,7 +1337,7 @@ e_hints_window_shade_direction_get(E_Client *ec)
    int ret;
    E_Direction dir;
 
-   if (!e_pixmap_is_x(ec->pixmap)) return E_DIRECTION_UP;
+   if (e_client_has_xwindow(ec)) return E_DIRECTION_UP;
    ret = ecore_x_window_prop_card32_get(e_client_util_win_get(ec),
                                         E_ATOM_SHADE_DIRECTION,
                                         &dir, 1);
@@ -1355,7 +1355,7 @@ e_hints_window_size_set(E_Client *ec)
 #else
    unsigned int sizes[4];
 
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    sizes[0] = ec->x;
    sizes[1] = ec->y;
    sizes[2] = ec->w;
@@ -1370,7 +1370,7 @@ e_hints_window_size_unset(E_Client *ec)
 #ifdef HAVE_WAYLAND_ONLY
    (void)ec;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    ecore_x_window_prop_property_del(e_client_util_win_get(ec), 
E_ATOM_BORDER_SIZE);
 #endif
 }
@@ -1384,7 +1384,7 @@ e_hints_window_size_get(E_Client *ec)
    int ret;
    unsigned int sizes[4];
 
-   if (!e_pixmap_is_x(ec->pixmap)) return 0;
+   if (e_client_has_xwindow(ec)) return 0;
    memset(sizes, 0, sizeof(sizes));
    ret = ecore_x_window_prop_card32_get(e_client_util_win_get(ec), 
E_ATOM_BORDER_SIZE,
                                         sizes, 4);
@@ -1408,7 +1408,7 @@ e_hints_window_maximized_set(E_Client *ec, int 
horizontal, int vertical)
    (void)horizontal;
    (void)vertical;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if ((horizontal) && (!ec->netwm.state.maximized_h))
      {
         ec->netwm.update.state = 1;
@@ -1444,7 +1444,7 @@ e_hints_window_fullscreen_set(E_Client *ec,
    (void)ec;
    (void)on;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if ((!ec->netwm.state.fullscreen) && (on))
      {
         ec->netwm.update.state = 1;
@@ -1467,7 +1467,7 @@ e_hints_window_sticky_set(E_Client *ec, int on)
    (void)ec;
    (void)on;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if ((!ec->netwm.state.sticky) && (on))
      {
         ec->netwm.update.state = 1;
@@ -1490,7 +1490,7 @@ e_hints_window_stacking_set(E_Client *ec, E_Stacking 
stacking)
    (void)ec;
    (void)stacking;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if (ec->netwm.state.stacking == stacking) return;
    ec->netwm.update.state = 1;
    ec->netwm.state.stacking = stacking;
@@ -1514,7 +1514,7 @@ e_hints_window_desktop_set(E_Client *ec)
     * a calloc()'d struct and thus has to have been set to 0. hell even
     * e_client.c explicitly sets it to 0 on creation of the border object.
     */
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    deskpos[0] = ec->desk->x;
    deskpos[1] = ec->desk->y;
    ecore_x_window_prop_card32_set(e_client_util_win_get(ec), E_ATOM_DESK, 
deskpos, 2);
@@ -1537,7 +1537,7 @@ e_hints_window_e_state_get(E_Client *ec)
    int num = 0, i = 0;
    int size = 0;
 
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    memset(state, 0, sizeof(state));
 
    /* ugly, but avoids possible future overflow if more states are added */
@@ -1570,7 +1570,7 @@ e_hints_window_qtopia_soft_menu_get(E_Client *ec)
 #else
    unsigned int val;
 
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if (ecore_x_window_prop_card32_get(e_client_util_win_get(ec), 
ATM__QTOPIA_SOFT_MENU, &val, 1))
      ec->qtopia.soft_menu = val;
    else
@@ -1586,7 +1586,7 @@ e_hints_window_qtopia_soft_menus_get(E_Client *ec)
 #else
    unsigned int val;
 
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    if (ecore_x_window_prop_card32_get(e_client_util_win_get(ec), 
ATM__QTOPIA_SOFT_MENUS, &val, 1))
      ec->qtopia.soft_menus = val;
    else
@@ -1602,7 +1602,7 @@ e_hints_window_virtual_keyboard_state_get(E_Client *ec)
 #else
    Ecore_X_Atom atom = 0;
 
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    ec->vkbd.state = 
ecore_x_e_virtual_keyboard_state_get(e_client_util_win_get(ec));
    if (ecore_x_window_prop_atom_get(e_client_util_win_get(ec),
                                     ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
@@ -1619,7 +1619,7 @@ e_hints_window_virtual_keyboard_get(E_Client *ec)
 #ifdef HAVE_WAYLAND_ONLY
    (void)ec;
 #else
-   if (!e_pixmap_is_x(ec->pixmap)) return;
+   if (e_client_has_xwindow(ec)) return;
    ec->vkbd.vkbd = ecore_x_e_virtual_keyboard_get(e_client_util_win_get(ec));
 #endif
 }

-- 


Reply via email to