1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
From c7f54838d09cc94dd23ed060889bae780758c391 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sun, 19 Feb 2012 23:09:07 +0100
Subject: [PATCH] Revert "Illume: Remove the popup. It's not needed now."
This reverts commit cba0bc9833689900930272fa5c4a2cd2529d3028.
---
src/modules/illume-indicator/e_mod_ind_win.c | 23 ++++++++++++++++++++---
src/modules/illume-indicator/e_mod_ind_win.h | 1 +
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/src/modules/illume-indicator/e_mod_ind_win.c b/src/modules/illume-indicator/e_mod_ind_win.c
index d3657d6..4a593fd 100644
--- a/src/modules/illume-indicator/e_mod_ind_win.c
+++ b/src/modules/illume-indicator/e_mod_ind_win.c
@@ -57,6 +57,11 @@ e_mod_ind_win_new(E_Zone *zone)
/* set this window to not accept or take focus */
ecore_x_icccm_hints_set(iwin->win->evas_win, 0, 0, 0, 0, 0, 0, 0);
+ /* create the popup */
+ iwin->popup = e_popup_new(zone, 0, 0, zone->w, h);
+ e_popup_name_set(iwin->popup, "indicator");
+ e_popup_layer_set(iwin->popup, 200);
+
/* create our event rectangle */
iwin->o_event = evas_object_rectangle_add(iwin->win->evas);
evas_object_color_set(iwin->o_event, 0, 0, 0, 0);
@@ -85,6 +90,8 @@ e_mod_ind_win_new(E_Zone *zone)
evas_object_move(iwin->o_base, 0, 0);
evas_object_show(iwin->o_base);
+ e_popup_edje_bg_object_set(iwin->popup, iwin->o_base);
+
/* create our gadget container */
iwin->gadcon = e_gadcon_swallowed_new("illume-indicator", zone->id,
iwin->o_base, "e.swallow.content");
@@ -133,12 +140,15 @@ e_mod_ind_win_new(E_Zone *zone)
/* set minimum size of this window & popup */
e_win_size_min_set(iwin->win, zone->w, h);
+ ecore_evas_size_min_set(iwin->popup->ecore_evas, zone->w, h);
/* position and resize this window */
e_win_move_resize(iwin->win, zone->x, zone->y, zone->w, h);
+ e_popup_move_resize(iwin->popup, zone->x, zone->y, zone->w, h);
/* show the window */
e_win_show(iwin->win);
+ e_popup_show(iwin->popup);
/* set this window on proper zone */
e_border_zone_set(iwin->win->border, zone);
@@ -188,6 +198,9 @@ _e_mod_ind_win_cb_free(Ind_Win *iwin)
/* tell conformant apps our position and size */
ecore_x_e_illume_indicator_geometry_set(iwin->zone->black_win, 0, 0, 0, 0);
+ if (iwin->popup) e_object_del(E_OBJECT(iwin->popup));
+ iwin->popup = NULL;
+
/* delete the window */
if (iwin->win) e_object_del(E_OBJECT(iwin->win));
iwin->win = NULL;
@@ -214,6 +227,7 @@ _e_mod_ind_win_cb_win_prop(void *data, int type __UNUSED__, void *event)
/* set minimum size of this window */
e_win_size_min_set(iwin->win, iwin->zone->w, h);
+ ecore_evas_size_min_set(iwin->popup->ecore_evas, iwin->zone->w, h);
/* NB: Not sure why, but we need to tell this border to fetch icccm
* size position hints now :( (NOTE: This was not needed a few days ago)
@@ -222,6 +236,7 @@ _e_mod_ind_win_cb_win_prop(void *data, int type __UNUSED__, void *event)
/* resize this window */
e_win_resize(iwin->win, iwin->zone->w, h);
+ e_popup_resize(iwin->popup, iwin->zone->w, h);
/* tell conformant apps our position and size */
ecore_x_e_illume_indicator_geometry_set(iwin->zone->black_win,
@@ -246,6 +261,7 @@ _e_mod_ind_win_cb_zone_resize(void *data, int type __UNUSED__, void *event)
/* set minimum size of this window to match zone size */
e_win_size_min_set(iwin->win, ev->zone->w, h);
+ ecore_evas_size_min_set(iwin->popup->ecore_evas, ev->zone->w, h);
return ECORE_CALLBACK_PASS_ON;
}
@@ -256,6 +272,7 @@ _e_mod_ind_win_cb_resize(E_Win *win)
Ind_Win *iwin;
if (!(iwin = win->data)) return;
+ if (iwin->popup) e_popup_resize(iwin->popup, win->w, win->h);
if (iwin->o_event) evas_object_resize(iwin->o_event, win->w, win->h);
if (iwin->o_base) evas_object_resize(iwin->o_base, win->w, win->h);
if (iwin->gadcon->o_container)
@@ -427,7 +444,7 @@ _e_mod_ind_win_cb_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj
bd->y = ny;
bd->changes.pos = 1;
bd->changed = 1;
- e_win_move(iwin->win, iwin->win->x, ny);
+ e_popup_move(iwin->popup, iwin->popup->x, ny);
}
}
}
@@ -553,7 +570,7 @@ _e_mod_ind_win_cb_border_hide(void *data, int type __UNUSED__, void *event)
if (!(iwin = data)) return ECORE_CALLBACK_PASS_ON;
ev = event;
if (ev->border != iwin->win->border) return ECORE_CALLBACK_PASS_ON;
- e_win_hide(iwin->win);
+ e_popup_hide(iwin->popup);
return ECORE_CALLBACK_PASS_ON;
}
@@ -566,6 +583,6 @@ _e_mod_ind_win_cb_border_show(void *data, int type __UNUSED__, void *event)
if (!(iwin = data)) return ECORE_CALLBACK_PASS_ON;
ev = event;
if (ev->border != iwin->win->border) return ECORE_CALLBACK_PASS_ON;
- e_win_show(iwin->win);
+ e_popup_show(iwin->popup);
return ECORE_CALLBACK_PASS_ON;
}
diff --git a/src/modules/illume-indicator/e_mod_ind_win.h b/src/modules/illume-indicator/e_mod_ind_win.h
index aa2dd1c..d41a861 100644
--- a/src/modules/illume-indicator/e_mod_ind_win.h
+++ b/src/modules/illume-indicator/e_mod_ind_win.h
@@ -14,6 +14,7 @@ struct _Ind_Win
Eina_List *hdls;
E_Win *win;
+ E_Popup *popup;
Evas_Object *o_base, *o_event;
E_Gadcon *gadcon;
E_Menu *menu;
--
1.7.8.4
|