aboutsummaryrefslogtreecommitdiffstats
path: root/src/pgtkmenu.c
diff options
context:
space:
mode:
authorYuuki Harano2020-10-05 21:18:06 +0900
committerJeff Walsh2020-11-24 12:24:40 +1100
commit4dbea5be1758788d9f6177ca3f7eaedc9e01ad56 (patch)
tree6dad3b1a3f2ad41ecb968e8ce8ad8be1b0f9e46c /src/pgtkmenu.c
parentbb6862df1beddeaa4802af58b94332ba48afbb4f (diff)
downloademacs-4dbea5be1758788d9f6177ca3f7eaedc9e01ad56.tar.gz
emacs-4dbea5be1758788d9f6177ca3f7eaedc9e01ad56.zip
Fix Gtk warnings
* src/gtkutil.c (xg_frame_set_char_size): Call appropriate function (xg_set_undecorated): Do nothing if child frame. (xg_set_no_focus_on_map): Do nothing if child frame. (xg_set_no_accept_focus): Do nothing if child frame. (xg_set_frame_icon): Do nothing if child frame. (xg_get_file_name): Do nothing if child frame. (xg_get_font): * src/pgtkterm.c (pgtk_focus_frame): Do nothing if child frames. (x_set_frame_alpha): Select correct widget. (x_new_focus_frame): Focus only when non-child frames. (pgtk_set_event_handler): Don't set for child frames. * src/pgtkfns.c (xg_set_icon): Do nothing if child frames. (xg_set_icon_from_xpm_data): Do nothing if child frames. (pgtk_set_sticky): Do nothing if child frames. (Fx_show_tip): Do nothing if child frames. (Fpgtk_set_mouse_absolute_pixel_position): Select correct widget. (Fpgtk_mouse_absolute_pixel_position): Select correct widget. * src/pgtkmenu.c (pgtk_menu_show): (pgtk_dialog_show):
Diffstat (limited to 'src/pgtkmenu.c')
-rw-r--r--src/pgtkmenu.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pgtkmenu.c b/src/pgtkmenu.c
index 7d15340b6be..79f562e2ab4 100644
--- a/src/pgtkmenu.c
+++ b/src/pgtkmenu.c
@@ -640,6 +640,11 @@ pgtk_menu_show (struct frame *f, int x, int y, int menuflags,
640 640
641 *error_name = NULL; 641 *error_name = NULL;
642 642
643 if (!FRAME_GTK_OUTER_WIDGET (f)) {
644 *error_name = "Can't popup from child frames.";
645 return Qnil;
646 }
647
643 if (menu_items_used <= MENU_ITEMS_PANE_LENGTH) 648 if (menu_items_used <= MENU_ITEMS_PANE_LENGTH)
644 { 649 {
645 *error_name = "Empty menu"; 650 *error_name = "Empty menu";
@@ -944,6 +949,11 @@ pgtk_dialog_show (struct frame *f, Lisp_Object title,
944 949
945 *error_name = NULL; 950 *error_name = NULL;
946 951
952 if (!FRAME_GTK_OUTER_WIDGET (f)) {
953 *error_name = "Can't popup from child frames.";
954 return Qnil;
955 }
956
947 if (menu_items_n_panes > 1) 957 if (menu_items_n_panes > 1)
948 { 958 {
949 *error_name = "Multiple panes in dialog box"; 959 *error_name = "Multiple panes in dialog box";