From d72660938813768793372b8d178f6d02b0f537ee Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Fri, 5 Apr 2013 15:03:15 +0900 Subject: [PATCH] Modified to call elm_win_raise() for mangifier window --- packaging/libscl-ui.spec | 2 +- scl/gwes/efl/sclwindows-efl.cpp | 50 +++++++++++++++++++++++++++++++---------- scl/include/sclversion.h | 2 +- 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/packaging/libscl-ui.spec b/packaging/libscl-ui.spec index 4c252be..8d7540d 100644 --- a/packaging/libscl-ui.spec +++ b/packaging/libscl-ui.spec @@ -3,7 +3,7 @@ Name: libscl-ui Summary: A library for developing XML-based software keyboards -Version: 0.2.6 +Version: 0.2.7 Release: 1 Group: TO BE / FILLED IN License: TO BE / FILLED IN diff --git a/scl/gwes/efl/sclwindows-efl.cpp b/scl/gwes/efl/sclwindows-efl.cpp index bbd299a..11a8c8e 100644 --- a/scl/gwes/efl/sclwindows-efl.cpp +++ b/scl/gwes/efl/sclwindows-efl.cpp @@ -23,14 +23,17 @@ #include "scluibuilder.h" #include "sclwindows.h" +#include #include #include #include #include +#include using namespace scl; -Ecore_X_Atom ATOM_WM_CLASS = 0; +static Ecore_X_Atom ATOM_WM_CLASS = 0; +static Ecore_X_Window app_window = 0; const sclint rotation_values_EFL[ROTATION_MAX] = { 0, // ROTATION_0 @@ -400,11 +403,6 @@ CSCLWindowsImplEfl::show_window(const sclwindow window, sclboolean queue) CSCLContext *context = CSCLContext::get_instance(); CSCLUtils *utils = CSCLUtils::get_instance(); if (windows && context && window) { -#ifndef APPLY_WINDOW_MANAGER_CHANGE - if (windows->get_magnifier_window() == window) { - set_parent(windows->get_base_window(), window); - } -#endif SclWindowContext *winctx = windows->get_window_context(window); if (!(context->get_hidden_state())) { if (winctx) { @@ -421,13 +419,41 @@ CSCLWindowsImplEfl::show_window(const sclwindow window, sclboolean queue) } } } - /* - * FIXME a solution to make magnifier window always on top - * N_SE-17689: magnifier window showing behind of candidate window - */ - if (window != windows->get_base_window()) { - //elm_win_raise((Evas_Object *)window); +#ifndef APPLY_WINDOW_MANAGER_CHANGE + if (windows->get_base_window() == window) { + int ret = 0; + Atom type_return; + int format_return; + unsigned long nitems_return; + unsigned long bytes_after_return; + unsigned char *data = NULL; + + Ecore_X_Window win = elm_win_xwindow_get(static_cast(window)); + ret = XGetWindowProperty ((Display *)ecore_x_display_get (), + ecore_x_window_root_get (win), + ecore_x_atom_get ("_ISF_ACTIVE_WINDOW"), + 0, G_MAXLONG, False, XA_WINDOW, &type_return, + &format_return, &nitems_return, &bytes_after_return, + &data); + + if (ret == Success) { + if ((type_return == XA_WINDOW) && (format_return == 32) && (data)) { + app_window = *(Window *)data; + if (data) + XFree (data); + } + } } + if (windows->get_magnifier_window() == window) { + /* + * FIXME a solution to make magnifier window always on top + * N_SE-17689: magnifier window showing behind of candidate window + */ + ecore_x_icccm_transient_for_set + (elm_win_xwindow_get(static_cast(window)), app_window); + elm_win_raise((Evas_Object *)window); + } +#endif utils->log("%p (basewin %p mag %p)\n", window, windows->get_base_window(), windows->get_magnifier_window()); } diff --git a/scl/include/sclversion.h b/scl/include/sclversion.h index 4885360..3ef978d 100644 --- a/scl/include/sclversion.h +++ b/scl/include/sclversion.h @@ -18,7 +18,7 @@ #ifndef __SCL_VERSION_H__ #define __SCL_VERSION_H__ -#define SCL_VERSION "0.2.6-1" +#define SCL_VERSION "0.2.7-1" #endif //__SCL_VERSION_H -- 2.7.4