From a675a3d955942e44e4e13c7bd5f48dde09de9875 Mon Sep 17 00:00:00 2001 From: GiWoong Kim Date: Wed, 29 Oct 2014 20:22:30 +0900 Subject: [PATCH] menu: fix compilation errors on MacOS Change-Id: Iaf72f25c390c8f826e42e1da92ee8b213a4cce36 Signed-off-by: GiWoong Kim --- tizen/src/ui/menu/contextmenu.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tizen/src/ui/menu/contextmenu.cpp b/tizen/src/ui/menu/contextmenu.cpp index b9fe39eff5..2ec3c081c9 100644 --- a/tizen/src/ui/menu/contextmenu.cpp +++ b/tizen/src/ui/menu/contextmenu.cpp @@ -35,7 +35,7 @@ #ifdef CONFIG_WIN32 #include -#else +#elif defined (CONFIG_LINUX) #include #include #endif @@ -75,9 +75,11 @@ void ContextMenu::createItems() { addSeparator(); /* Always On Top menu */ +#ifndef CONFIG_DARWIN actionTopMost = addAction("&Always on Top"); actionTopMost->setCheckable(true); connect(actionTopMost, SIGNAL(triggered(bool)), this, SLOT(slotTopMost(bool))); +#endif /* = Rotate menu = */ if (win->uiInfo->mainFormList.count() > 1) { @@ -269,7 +271,7 @@ void ContextMenu::slotTopMost(bool on) HWND hWnd = (HWND)parent->winId(); HWND hWndInsertAfter = ((on == true) ? HWND_TOPMOST : HWND_NOTOPMOST); SetWindowPos(hWnd, hWndInsertAfter, parent->pos().x(), parent->pos().y(), 0, 0, SWP_NOSIZE); -#else +#elif defined (CONFIG_LINUX) Display* display = XOpenDisplay(NULL); if (display == NULL) { qDebug("Error: XOpenDisplay() Failed. Always on top failed."); @@ -293,6 +295,8 @@ void ContextMenu::slotTopMost(bool on) XFlush(display); XCloseDisplay(display); +#elif defined (CONFIG_DARWIN) + // TODO: #endif actionTopMost->setChecked(on); -- 2.34.1