fix wayland-only build

devs/bu5hm4n/debug_code
Mike Blumenkrantz 6 years ago
parent 16378acfd2
commit 94633fbde1
  1. 10
      src/bin/e_client.c
  2. 6
      src/bin/e_client.h
  3. 2
      src/bin/e_desktop_editor.c
  4. 15
      src/bin/e_int_client_menu.c
  5. 87
      src/modules/everything/evry_plug_windows.c

@ -3169,7 +3169,11 @@ e_client_mouse_move(E_Client *ec, Evas_Point *output)
(e_config->drag_resist * e_config->drag_resist))
{
/* start drag! */
if (ec->netwm.icons || ec->desktop || ec->internal_icon)
if (
#ifndef HAVE_WAYLAND_ONLY
ec->netwm.icons ||
#endif
ec->desktop || ec->internal_icon)
{
Evas_Object *o = NULL;
int x, y, w, h;
@ -5087,6 +5091,7 @@ e_client_icon_add(E_Client *ec, Evas *evas)
}
return o;
}
#ifndef HAVE_WAYLAND_ONLY
if ((e_config->use_app_icon) && (ec->icon_preference != E_ICON_PREF_USER))
{
if (ec->netwm.icons)
@ -5099,6 +5104,7 @@ e_client_icon_add(E_Client *ec, Evas *evas)
return o;
}
}
#endif
if (!o)
{
if ((ec->desktop) && (ec->icon_preference != E_ICON_PREF_NETWM))
@ -5110,6 +5116,7 @@ e_client_icon_add(E_Client *ec, Evas *evas)
return o;
}
}
#ifndef HAVE_WAYLAND_ONLY
else if (ec->netwm.icons)
{
o = e_icon_add(evas);
@ -5119,6 +5126,7 @@ e_client_icon_add(E_Client *ec, Evas *evas)
e_icon_alpha_set(o, 1);
return o;
}
#endif
}
o = e_icon_add(evas);

@ -411,9 +411,9 @@ struct E_Client
unsigned int desktop;
Eina_Stringshare *name;
Eina_Stringshare *icon_name;
#ifndef HAVE_WAYLAND_ONLY
Ecore_X_Icon *icons;
#endif
int num_icons;
unsigned int user_time;
unsigned char opacity;
@ -527,7 +527,9 @@ struct E_Client
unsigned char wait_for_done : 1;
unsigned char use : 1;
} profile;
#ifndef HAVE_WAYLAND_ONLY
Ecore_X_Stack_Type stack;
#endif
unsigned char centered : 1;
unsigned char video : 1;
} state;

@ -165,6 +165,7 @@ e_desktop_client_create(E_Client *ec)
// disable this
// if (ec->netwm.startup_id > 0) desktop->startup_notify = 1;
#ifndef HAVE_WAYLAND_ONLY
if (ec->netwm.icons)
{
/* FIXME
@ -180,6 +181,7 @@ e_desktop_client_create(E_Client *ec)
else
fprintf(stderr, "Could not save file from ARGB: %s\n", path);
}
#endif
return desktop;
}

@ -47,10 +47,11 @@ static void _e_client_menu_cb_ibar_add_pre(void *data, E_Menu *m, E_Menu_Item *m
static void _e_client_menu_cb_ibar_add(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_client_menu_cb_border_pre(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_client_menu_cb_iconpref_e(void *data, E_Menu *m, E_Menu_Item *mi);
#ifndef HAVE_WAYLAND_ONLY
static void _e_client_menu_cb_iconpref_netwm(void *data, E_Menu *m, E_Menu_Item *mi);
#endif
static void _e_client_menu_cb_iconpref_user(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_client_menu_cb_default_icon(void *data, E_Menu *m, E_Menu_Item *mi);
static void _e_client_menu_cb_netwm_icon(void *data, E_Menu *m, E_Menu_Item *mi);
static Eina_List *menu_hooks = NULL;
@ -1479,7 +1480,7 @@ _e_client_menu_cb_default_icon(void *data, E_Menu *m, E_Menu_Item *mi)
ec->icon_preference = prev_icon_pref;
mi->icon_object = o;
}
#ifndef HAVE_WAYLAND_ONLY
static void
_e_client_menu_cb_netwm_icon(void *data, E_Menu *m, E_Menu_Item *mi)
{
@ -1499,7 +1500,7 @@ _e_client_menu_cb_netwm_icon(void *data, E_Menu *m, E_Menu_Item *mi)
mi->icon_object = o;
}
}
#endif
static void
_e_client_menu_cb_border_pre(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi)
{
@ -1535,7 +1536,7 @@ _e_client_menu_cb_border_pre(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi)
e_menu_item_toggle_set(submi, (ec->icon_preference == E_ICON_PREF_E_DEFAULT ? 1 : 0));
e_menu_item_realize_callback_set(submi, _e_client_menu_cb_default_icon, ec);
e_menu_item_callback_set(submi, _e_client_menu_cb_iconpref_e, ec);
#ifndef HAVE_WAYLAND_ONLY
submi = e_menu_item_new(subm);
e_menu_item_label_set(submi, _("Use Application Provided Icon"));
e_menu_item_radio_set(submi, 1);
@ -1543,7 +1544,7 @@ _e_client_menu_cb_border_pre(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi)
e_menu_item_toggle_set(submi, (ec->icon_preference == E_ICON_PREF_NETWM ? 1 : 0));
e_menu_item_realize_callback_set(submi, _e_client_menu_cb_netwm_icon, ec);
e_menu_item_callback_set(submi, _e_client_menu_cb_iconpref_netwm, ec);
#endif
submi = e_menu_item_new(subm);
e_menu_item_label_set(submi, _("Use User Defined Icon"));
e_menu_item_radio_set(submi, 1);
@ -1587,7 +1588,7 @@ _e_client_menu_cb_iconpref_user(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *
ec->changes.icon = 1;
ec->changed = 1;
}
#ifndef HAVE_WAYLAND_ONLY
static void
_e_client_menu_cb_iconpref_netwm(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi EINA_UNUSED)
{
@ -1599,7 +1600,7 @@ _e_client_menu_cb_iconpref_netwm(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item
ec->changes.icon = 1;
ec->changed = 1;
}
#endif
static void
_e_client_menu_cb_skip_pre(void *data, E_Menu *m EINA_UNUSED, E_Menu_Item *mi)
{

@ -188,94 +188,9 @@ _icon_get(Evry_Item *it, Evas *e)
{
GET_BORDER(bi, it);
Evas_Object *o = NULL;
E_Client *ec = bi->client;
if (ec->internal)
{
if (!ec->internal_icon)
{
o = e_icon_add(e);
e_util_icon_theme_set(o, "enlightenment");
}
else if (!ec->internal_icon_key)
{
char *ext;
ext = strrchr(ec->internal_icon, '.');
if ((ext) && ((!strcmp(ext, ".edj"))))
{
o = edje_object_add(e);
if (!edje_object_file_set(o, ec->internal_icon, "icon"))
e_util_icon_theme_set(o, "enlightenment");
}
else if (ext)
{
o = e_icon_add(e);
e_icon_file_set(o, ec->internal_icon);
}
else
{
o = e_icon_add(e);
e_icon_scale_size_set(o, 128);
if (!e_util_icon_theme_set(o, ec->internal_icon))
e_util_icon_theme_set(o, "enlightenment");
}
}
else
{
o = edje_object_add(e);
edje_object_file_set(o, ec->internal_icon, ec->internal_icon_key);
}
return o;
}
if (ec->netwm.icons)
{
if (e_config->use_app_icon)
goto _use_netwm_icon;
if (ec->remember && (ec->remember->prop.icon_preference == E_ICON_PREF_NETWM))
goto _use_netwm_icon;
}
if (ec->desktop)
{
o = e_util_desktop_icon_add(ec->desktop, 128, e);
if (o) return o;
}
_use_netwm_icon:
if (ec->netwm.icons)
{
int i, size, tmp, found = 0;
o = e_icon_add(e);
size = ec->netwm.icons[0].width;
for (i = 1; i < ec->netwm.num_icons; i++)
{
if ((tmp = ec->netwm.icons[i].width) > size)
{
size = tmp;
found = i;
}
}
e_icon_data_set(o, ec->netwm.icons[found].data,
ec->netwm.icons[found].width,
ec->netwm.icons[found].height);
e_icon_alpha_set(o, 1);
return o;
}
o = e_client_icon_add(ec, e);
if (o) return o;
o = edje_object_add(e);
e_util_icon_theme_set(o, "unknown");
return o;
return e_client_icon_add(ec, e);
}
/***************************************************************************/

Loading…
Cancel
Save