aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu.c
diff options
context:
space:
mode:
authorEli Zaretskii2014-02-04 18:13:51 +0200
committerEli Zaretskii2014-02-04 18:13:51 +0200
commite139a33cd97a0e12405cae760ca5e436d9dcbc74 (patch)
treee744130600582bf8005e7aad818c55a662a18428 /src/menu.c
parent40d2f2e4bb6b4e0b373180ae12836f6b335dc0bb (diff)
downloademacs-e139a33cd97a0e12405cae760ca5e436d9dcbc74.tar.gz
emacs-e139a33cd97a0e12405cae760ca5e436d9dcbc74.zip
Fix bug #16636 with simple dialogs on MS-Windows.
src/w32menu.c (w32_popup_dialog): Don't condition the whole function on HAVE_DIALOGS. If the dialog is "simple", pop up a message box to show it; otherwise return 'unsupported--w32-dialog' to signal to the caller that emulation with menus is necessary. This resurrects code inadvertently deleted by the 2013-10-08 commit. (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog. src/w32term.h (w32_popup_dialog): Prototype is no longer conditioned by HAVE_DIALOGS. src/menu.c (Fx_popup_dialog): Don't condition the call to w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a special symbol 'unsupported--w32-dialog', emulate the dialog with a menu by calling x-popup-menu. src/menu.h (Qunsupported__w32_dialog): New extern variable.
Diffstat (limited to 'src/menu.c')
-rw-r--r--src/menu.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/menu.c b/src/menu.c
index c38152f47e8..47ebc922b84 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1566,9 +1566,15 @@ for instance using the window manager, then this produces a quit and
1566 return xw_popup_dialog (f, header, contents); 1566 return xw_popup_dialog (f, header, contents);
1567 else 1567 else
1568#endif 1568#endif
1569#if defined (HAVE_NTGUI) && defined (HAVE_DIALOGS) 1569#if defined (HAVE_NTGUI)
1570 if (FRAME_W32_P (f)) 1570 if (FRAME_W32_P (f))
1571 return w32_popup_dialog (f, header, contents); 1571 {
1572 Lisp_Object selection = w32_popup_dialog (f, header, contents);
1573
1574 if (!EQ (selection, Qunsupported__w32_dialog))
1575 return selection;
1576 goto dialog_via_menu;
1577 }
1572 else 1578 else
1573#endif 1579#endif
1574#ifdef HAVE_NS 1580#ifdef HAVE_NS
@@ -1582,6 +1588,8 @@ for instance using the window manager, then this produces a quit and
1582 Lisp_Object x, y, frame, newpos, prompt; 1588 Lisp_Object x, y, frame, newpos, prompt;
1583 int x_coord, y_coord; 1589 int x_coord, y_coord;
1584 1590
1591 dialog_via_menu:
1592
1585 prompt = Fcar (contents); 1593 prompt = Fcar (contents);
1586 if (FRAME_WINDOW_P (f)) 1594 if (FRAME_WINDOW_P (f))
1587 { 1595 {