aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-10-31 13:42:33 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-11-23 13:04:12 +0900
commit2b50d56bba3f81a4183d265113dd260ffba8f9ec (patch)
treec21308ccae13de529868bd34b9a1506a735f916d /src/lib/elementary/efl_ui_win.c
parentecore_evas/x: Inform WM about borders and shadows (diff)
downloadefl-2b50d56bba3f81a4183d265113dd260ffba8f9ec.tar.gz
win: Set proper cursor for resize borders (CSD in X)
They look horrible in E (X), why is the cursor theme not applied?
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index e3782eb3a0..da68b2b988 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -3945,6 +3945,16 @@ _elm_win_frame_pre_render(void *data, Evas *e EINA_UNUSED, void *ev EINA_UNUSED)
}
#endif
+static inline void
+_elm_object_part_cursor_set(Evas_Object *obj, Evas_Object *edj,
+ const char *part, const char *cursor)
+{
+ Evas_Object *sub = (Evas_Object *) edje_object_part_object_get(edj, part);
+ if (!sub) return;
+
+ elm_object_sub_cursor_set(sub, obj, cursor);
+}
+
static void
_elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *style)
{
@@ -4035,6 +4045,27 @@ _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *style)
edje_object_signal_callback_add
(sd->frame_obj, "elm,action,menu", "elm", _elm_win_frame_cb_menu, obj);
+ if (!sd->pointer.obj)
+ {
+ int i = sd->rot / 90;
+ _elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.t",
+ _border_side[(0 + i) % 4].name);
+ _elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.b",
+ _border_side[(2 + i) % 4].name);
+ _elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.l",
+ _border_side[(1 + i) % 4].name);
+ _elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.r",
+ _border_side[(3 + i) % 4].name);
+ _elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.tl",
+ _border_corner[(0 + i) % 4].name);
+ _elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.tr",
+ _border_corner[(3 + i) % 4].name);
+ _elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.bl",
+ _border_corner[(1 + i) % 4].name);
+ _elm_object_part_cursor_set(obj, sd->frame_obj, "elm.event.resize.br",
+ _border_corner[(2 + i) % 4].name);
+ }
+
if (sd->title)
{
edje_object_part_text_escaped_set