summaryrefslogtreecommitdiff
path: root/lwlib
diff options
context:
space:
mode:
authorJan D <jan.h.d@swipnet.se>2015-02-28 16:20:45 +0100
committerJan D <jan.h.d@swipnet.se>2015-02-28 16:20:45 +0100
commite605af8880f9e0670f62e6646bb12e53c9c5cfa8 (patch)
treef4f36a94e8c07e1c81027b375077569cebddd359 /lwlib
parent1a50945fa4c666ae2ab5cd9419d23ad063ea1249 (diff)
downloademacs-e605af8880f9e0670f62e6646bb12e53c9c5cfa8.tar.gz
* xlwmenu.c (remap_menubar): Re-realize menu to force move under Gnome 3.
Diffstat (limited to 'lwlib')
-rw-r--r--lwlib/ChangeLog5
-rw-r--r--lwlib/xlwmenu.c15
2 files changed, 15 insertions, 5 deletions
diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog
index 8d536f0b3ad..c98d72575a8 100644
--- a/lwlib/ChangeLog
+++ b/lwlib/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-28 Jan Djärv <jan.h.d@swipnet.se>
+
+ * xlwmenu.c (remap_menubar): Re-realize menu to force move under
+ Gnome 3.
+
2015-01-04 Paul Eggert <eggert@cs.ucla.edu>
Less 'make' chatter for lwlib
diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index 4cd0e42b895..f781b7ee54c 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -1510,17 +1510,21 @@ remap_menubar (XlwMenuWidget mw)
if (mw->menu.horizontal && i == 1)
ws->y += mw->menu.margin;
+ /* WMs like Gnome 3 ignores requests to move windows. So we
+ must destroy the current one and create a new to get it to move. */
+ XtUnrealizeWidget (ws->w);
+ XtRealizeWidget (ws->w);
+ ws->window = XtWindow (ws->w);
+
size_menu (mw, i);
fit_to_screen (mw, ws, previous_ws, mw->menu.horizontal && i == 1);
create_pixmap_for_menu (ws, mw);
- XtMoveWidget (ws->w, ws->x, ws->y);
- XtPopup (ws->w, XtGrabNone);
- XtResizeWidget (ws->w, ws->width, ws->height,
- mw->core.border_width);
- XtResizeWindow (ws->w);
+ XtConfigureWidget (ws->w, ws->x, ws->y, ws->width, ws->height,
+ ws->w->core.border_width);
display_menu (mw, i, False, &selection_position, NULL, NULL);
+ XtPopup (ws->w, XtGrabNone);
}
/* unmap the menus that popped down */
@@ -2615,6 +2619,7 @@ pop_up_menu (XlwMenuWidget mw, XButtonPressedEvent *event)
mw->menu.popped_up = True;
if (XtIsShell (XtParent ((Widget)mw)))
{
+ fprintf(stderr, "Config %d %d\n", x, y);
XtConfigureWidget (XtParent ((Widget)mw), x, y, w, h,
XtParent ((Widget)mw)->core.border_width);
XtPopup (XtParent ((Widget)mw), XtGrabExclusive);