diff options
| author | Jan D | 2015-02-28 16:20:45 +0100 |
|---|---|---|
| committer | Jan D | 2015-02-28 16:20:45 +0100 |
| commit | e605af8880f9e0670f62e6646bb12e53c9c5cfa8 (patch) | |
| tree | f4f36a94e8c07e1c81027b375077569cebddd359 | |
| parent | 1a50945fa4c666ae2ab5cd9419d23ad063ea1249 (diff) | |
| download | emacs-e605af8880f9e0670f62e6646bb12e53c9c5cfa8.tar.gz emacs-e605af8880f9e0670f62e6646bb12e53c9c5cfa8.zip | |
* xlwmenu.c (remap_menubar): Re-realize menu to force move under Gnome 3.
| -rw-r--r-- | lwlib/ChangeLog | 5 | ||||
| -rw-r--r-- | lwlib/xlwmenu.c | 15 |
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 @@ | |||
| 1 | 2015-02-28 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xlwmenu.c (remap_menubar): Re-realize menu to force move under | ||
| 4 | Gnome 3. | ||
| 5 | |||
| 1 | 2015-01-04 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2015-01-04 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | Less 'make' chatter for lwlib | 8 | 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) | |||
| 1510 | if (mw->menu.horizontal && i == 1) | 1510 | if (mw->menu.horizontal && i == 1) |
| 1511 | ws->y += mw->menu.margin; | 1511 | ws->y += mw->menu.margin; |
| 1512 | 1512 | ||
| 1513 | /* WMs like Gnome 3 ignores requests to move windows. So we | ||
| 1514 | must destroy the current one and create a new to get it to move. */ | ||
| 1515 | XtUnrealizeWidget (ws->w); | ||
| 1516 | XtRealizeWidget (ws->w); | ||
| 1517 | ws->window = XtWindow (ws->w); | ||
| 1518 | |||
| 1513 | size_menu (mw, i); | 1519 | size_menu (mw, i); |
| 1514 | 1520 | ||
| 1515 | fit_to_screen (mw, ws, previous_ws, mw->menu.horizontal && i == 1); | 1521 | fit_to_screen (mw, ws, previous_ws, mw->menu.horizontal && i == 1); |
| 1516 | 1522 | ||
| 1517 | create_pixmap_for_menu (ws, mw); | 1523 | create_pixmap_for_menu (ws, mw); |
| 1518 | XtMoveWidget (ws->w, ws->x, ws->y); | 1524 | XtConfigureWidget (ws->w, ws->x, ws->y, ws->width, ws->height, |
| 1519 | XtPopup (ws->w, XtGrabNone); | 1525 | ws->w->core.border_width); |
| 1520 | XtResizeWidget (ws->w, ws->width, ws->height, | ||
| 1521 | mw->core.border_width); | ||
| 1522 | XtResizeWindow (ws->w); | ||
| 1523 | display_menu (mw, i, False, &selection_position, NULL, NULL); | 1526 | display_menu (mw, i, False, &selection_position, NULL, NULL); |
| 1527 | XtPopup (ws->w, XtGrabNone); | ||
| 1524 | } | 1528 | } |
| 1525 | 1529 | ||
| 1526 | /* unmap the menus that popped down */ | 1530 | /* unmap the menus that popped down */ |
| @@ -2615,6 +2619,7 @@ pop_up_menu (XlwMenuWidget mw, XButtonPressedEvent *event) | |||
| 2615 | mw->menu.popped_up = True; | 2619 | mw->menu.popped_up = True; |
| 2616 | if (XtIsShell (XtParent ((Widget)mw))) | 2620 | if (XtIsShell (XtParent ((Widget)mw))) |
| 2617 | { | 2621 | { |
| 2622 | fprintf(stderr, "Config %d %d\n", x, y); | ||
| 2618 | XtConfigureWidget (XtParent ((Widget)mw), x, y, w, h, | 2623 | XtConfigureWidget (XtParent ((Widget)mw), x, y, w, h, |
| 2619 | XtParent ((Widget)mw)->core.border_width); | 2624 | XtParent ((Widget)mw)->core.border_width); |
| 2620 | XtPopup (XtParent ((Widget)mw), XtGrabExclusive); | 2625 | XtPopup (XtParent ((Widget)mw), XtGrabExclusive); |