From 9d5b64eb4f61fab17bf5ccf46ef0b31c5bb50488 Mon Sep 17 00:00:00 2001 From: Choi Munseok Date: Fri, 7 Jun 2013 08:23:52 +0900 Subject: [PATCH] Fix the duplication in transient_for_set Change-Id: I40fc46a78bb83c4bd4cfa59876b484015fbb607b Signed-off-by: Choi Munseok --- src/ui/FUi_EcoreEvas.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/ui/FUi_EcoreEvas.cpp b/src/ui/FUi_EcoreEvas.cpp index 9e85d5e..89c44dc 100644 --- a/src/ui/FUi_EcoreEvas.cpp +++ b/src/ui/FUi_EcoreEvas.cpp @@ -1391,10 +1391,13 @@ _EcoreEvas::GetProcessId(unsigned int window) void _EcoreEvas::SetOwner(NativeWindowHandle ownee, NativeWindowHandle owner) { - ecore_x_icccm_transient_for_unset(ownee); - ecore_x_icccm_transient_for_set(ownee, owner); - - SysLog(NID_UI, "[Window Order Group][Window : 0x%x] transient_for_set -> 0x%x", ownee, owner); + Ecore_X_Window win = ecore_x_icccm_transient_for_get(ownee); + if (win != owner) + { + ecore_x_icccm_transient_for_unset(ownee); + ecore_x_icccm_transient_for_set(ownee, owner); + SysLog(NID_UI, "[Window Order Group][Window : 0x%x] transient_for_set -> 0x%x", ownee, owner); + } } void @@ -2385,9 +2388,13 @@ _EcoreEvas::SetOwner(const _Window& ownee, const _Control& owner) ecore_x_netwm_window_type_get(owneeWin, &type); if ((type == ECORE_X_WINDOW_TYPE_NORMAL) || (type == ECORE_X_WINDOW_TYPE_UTILITY)) { - ecore_x_icccm_transient_for_unset(owneeWin); - ecore_x_icccm_transient_for_set(owneeWin, ownerWin); - SysLog(NID_UI, "[Window Order Group][Window : 0x%x] transient_for_set -> 0x%x", owneeWin, ownerWin); + Ecore_X_Window win = ecore_x_icccm_transient_for_get(owneeWin); + if (win != ownerWin) + { + ecore_x_icccm_transient_for_unset(owneeWin); + ecore_x_icccm_transient_for_set(owneeWin, ownerWin); + SysLog(NID_UI, "[Window Order Group][Window : 0x%x] transient_for_set -> 0x%x", owneeWin, ownerWin); + } } else { -- 2.7.4