diff options
Diffstat (limited to 'src/gtkutil.c')
| -rw-r--r-- | src/gtkutil.c | 124 |
1 files changed, 61 insertions, 63 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index 237d031295c..6228f2150f5 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -35,6 +35,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 35 | #include "keyboard.h" | 35 | #include "keyboard.h" |
| 36 | #include "charset.h" | 36 | #include "charset.h" |
| 37 | #include "coding.h" | 37 | #include "coding.h" |
| 38 | #include "font.h" | ||
| 39 | |||
| 38 | #include <gdk/gdkkeysyms.h> | 40 | #include <gdk/gdkkeysyms.h> |
| 39 | #include "xsettings.h" | 41 | #include "xsettings.h" |
| 40 | 42 | ||
| @@ -641,7 +643,7 @@ hierarchy_ch_cb (GtkWidget *widget, | |||
| 641 | GtkWidget *previous_toplevel, | 643 | GtkWidget *previous_toplevel, |
| 642 | gpointer user_data) | 644 | gpointer user_data) |
| 643 | { | 645 | { |
| 644 | struct frame *f = (struct frame *) user_data; | 646 | struct frame *f = user_data; |
| 645 | struct x_output *x = f->output_data.x; | 647 | struct x_output *x = f->output_data.x; |
| 646 | GtkWidget *top = gtk_widget_get_toplevel (x->ttip_lbl); | 648 | GtkWidget *top = gtk_widget_get_toplevel (x->ttip_lbl); |
| 647 | 649 | ||
| @@ -663,7 +665,7 @@ qttip_cb (GtkWidget *widget, | |||
| 663 | GtkTooltip *tooltip, | 665 | GtkTooltip *tooltip, |
| 664 | gpointer user_data) | 666 | gpointer user_data) |
| 665 | { | 667 | { |
| 666 | struct frame *f = (struct frame *) user_data; | 668 | struct frame *f = user_data; |
| 667 | struct x_output *x = f->output_data.x; | 669 | struct x_output *x = f->output_data.x; |
| 668 | if (x->ttip_widget == NULL) | 670 | if (x->ttip_widget == NULL) |
| 669 | { | 671 | { |
| @@ -870,29 +872,23 @@ xg_clear_under_internal_border (struct frame *f) | |||
| 870 | if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0) | 872 | if (FRAME_INTERNAL_BORDER_WIDTH (f) > 0) |
| 871 | { | 873 | { |
| 872 | GtkWidget *wfixed = f->output_data.x->edit_widget; | 874 | GtkWidget *wfixed = f->output_data.x->edit_widget; |
| 875 | |||
| 873 | gtk_widget_queue_draw (wfixed); | 876 | gtk_widget_queue_draw (wfixed); |
| 874 | gdk_window_process_all_updates (); | 877 | gdk_window_process_all_updates (); |
| 875 | x_clear_area (FRAME_X_DISPLAY (f), | 878 | |
| 876 | FRAME_X_WINDOW (f), | 879 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0, |
| 877 | 0, 0, | 880 | FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f)); |
| 878 | FRAME_PIXEL_WIDTH (f), | 881 | |
| 879 | FRAME_INTERNAL_BORDER_WIDTH (f), 0); | 882 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, 0, |
| 880 | x_clear_area (FRAME_X_DISPLAY (f), | 883 | FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f)); |
| 881 | FRAME_X_WINDOW (f), | 884 | |
| 882 | 0, 0, | 885 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 0, |
| 883 | FRAME_INTERNAL_BORDER_WIDTH (f), | 886 | FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f), |
| 884 | FRAME_PIXEL_HEIGHT (f), 0); | 887 | FRAME_PIXEL_WIDTH (f), FRAME_INTERNAL_BORDER_WIDTH (f)); |
| 885 | x_clear_area (FRAME_X_DISPLAY (f), | 888 | |
| 886 | FRAME_X_WINDOW (f), | 889 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| 887 | 0, FRAME_PIXEL_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f), | 890 | FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f), |
| 888 | FRAME_PIXEL_WIDTH (f), | 891 | 0, FRAME_INTERNAL_BORDER_WIDTH (f), FRAME_PIXEL_HEIGHT (f)); |
| 889 | FRAME_INTERNAL_BORDER_WIDTH (f), 0); | ||
| 890 | x_clear_area (FRAME_X_DISPLAY (f), | ||
| 891 | FRAME_X_WINDOW (f), | ||
| 892 | FRAME_PIXEL_WIDTH (f) - FRAME_INTERNAL_BORDER_WIDTH (f), | ||
| 893 | 0, | ||
| 894 | FRAME_INTERNAL_BORDER_WIDTH (f), | ||
| 895 | FRAME_PIXEL_HEIGHT (f), 0); | ||
| 896 | } | 892 | } |
| 897 | } | 893 | } |
| 898 | 894 | ||
| @@ -1073,7 +1069,7 @@ style_changed_cb (GObject *go, | |||
| 1073 | gpointer user_data) | 1069 | gpointer user_data) |
| 1074 | { | 1070 | { |
| 1075 | struct input_event event; | 1071 | struct input_event event; |
| 1076 | GdkDisplay *gdpy = (GdkDisplay *) user_data; | 1072 | GdkDisplay *gdpy = user_data; |
| 1077 | const char *display_name = gdk_display_get_name (gdpy); | 1073 | const char *display_name = gdk_display_get_name (gdpy); |
| 1078 | Display *dpy = GDK_DISPLAY_XDISPLAY (gdpy); | 1074 | Display *dpy = GDK_DISPLAY_XDISPLAY (gdpy); |
| 1079 | 1075 | ||
| @@ -1115,7 +1111,7 @@ delete_cb (GtkWidget *widget, | |||
| 1115 | #ifdef HAVE_GTK3 | 1111 | #ifdef HAVE_GTK3 |
| 1116 | /* The event doesn't arrive in the normal event loop. Send event | 1112 | /* The event doesn't arrive in the normal event loop. Send event |
| 1117 | here. */ | 1113 | here. */ |
| 1118 | struct frame *f = (struct frame *) user_data; | 1114 | struct frame *f = user_data; |
| 1119 | struct input_event ie; | 1115 | struct input_event ie; |
| 1120 | 1116 | ||
| 1121 | EVENT_INIT (ie); | 1117 | EVENT_INIT (ie); |
| @@ -1341,6 +1337,7 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position) | |||
| 1341 | int base_width, base_height; | 1337 | int base_width, base_height; |
| 1342 | int min_rows = 0, min_cols = 0; | 1338 | int min_rows = 0, min_cols = 0; |
| 1343 | int win_gravity = f->win_gravity; | 1339 | int win_gravity = f->win_gravity; |
| 1340 | Lisp_Object fs_state, frame; | ||
| 1344 | 1341 | ||
| 1345 | /* Don't set size hints during initialization; that apparently leads | 1342 | /* Don't set size hints during initialization; that apparently leads |
| 1346 | to a race condition. See the thread at | 1343 | to a race condition. See the thread at |
| @@ -1348,6 +1345,16 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position) | |||
| 1348 | if (NILP (Vafter_init_time) || !FRAME_GTK_OUTER_WIDGET (f)) | 1345 | if (NILP (Vafter_init_time) || !FRAME_GTK_OUTER_WIDGET (f)) |
| 1349 | return; | 1346 | return; |
| 1350 | 1347 | ||
| 1348 | XSETFRAME (frame, f); | ||
| 1349 | fs_state = Fframe_parameter (frame, Qfullscreen); | ||
| 1350 | if (EQ (fs_state, Qmaximized) || EQ (fs_state, Qfullboth)) | ||
| 1351 | { | ||
| 1352 | /* Don't set hints when maximized or fullscreen. Apparently KWin and | ||
| 1353 | Gtk3 don't get along and the frame shrinks (!). | ||
| 1354 | */ | ||
| 1355 | return; | ||
| 1356 | } | ||
| 1357 | |||
| 1351 | if (flags) | 1358 | if (flags) |
| 1352 | { | 1359 | { |
| 1353 | memset (&size_hints, 0, sizeof (size_hints)); | 1360 | memset (&size_hints, 0, sizeof (size_hints)); |
| @@ -1642,7 +1649,7 @@ xg_dialog_response_cb (GtkDialog *w, | |||
| 1642 | gint response, | 1649 | gint response, |
| 1643 | gpointer user_data) | 1650 | gpointer user_data) |
| 1644 | { | 1651 | { |
| 1645 | struct xg_dialog_data *dd = (struct xg_dialog_data *)user_data; | 1652 | struct xg_dialog_data *dd = user_data; |
| 1646 | dd->response = response; | 1653 | dd->response = response; |
| 1647 | g_main_loop_quit (dd->loop); | 1654 | g_main_loop_quit (dd->loop); |
| 1648 | } | 1655 | } |
| @@ -1671,16 +1678,16 @@ pop_down_dialog (void *arg) | |||
| 1671 | static gboolean | 1678 | static gboolean |
| 1672 | xg_maybe_add_timer (gpointer data) | 1679 | xg_maybe_add_timer (gpointer data) |
| 1673 | { | 1680 | { |
| 1674 | struct xg_dialog_data *dd = (struct xg_dialog_data *) data; | 1681 | struct xg_dialog_data *dd = data; |
| 1675 | EMACS_TIME next_time = timer_check (); | 1682 | struct timespec next_time = timer_check (); |
| 1676 | 1683 | ||
| 1677 | dd->timerid = 0; | 1684 | dd->timerid = 0; |
| 1678 | 1685 | ||
| 1679 | if (EMACS_TIME_VALID_P (next_time)) | 1686 | if (timespec_valid_p (next_time)) |
| 1680 | { | 1687 | { |
| 1681 | time_t s = EMACS_SECS (next_time); | 1688 | time_t s = next_time.tv_sec; |
| 1682 | int per_ms = EMACS_TIME_RESOLUTION / 1000; | 1689 | int per_ms = TIMESPEC_RESOLUTION / 1000; |
| 1683 | int ms = (EMACS_NSECS (next_time) + per_ms - 1) / per_ms; | 1690 | int ms = (next_time.tv_nsec + per_ms - 1) / per_ms; |
| 1684 | if (s <= ((guint) -1 - ms) / 1000) | 1691 | if (s <= ((guint) -1 - ms) / 1000) |
| 1685 | dd->timerid = g_timeout_add (s * 1000 + ms, xg_maybe_add_timer, dd); | 1692 | dd->timerid = g_timeout_add (s * 1000 + ms, xg_maybe_add_timer, dd); |
| 1686 | } | 1693 | } |
| @@ -1921,7 +1928,7 @@ static char * | |||
| 1921 | xg_get_file_name_from_selector (GtkWidget *w) | 1928 | xg_get_file_name_from_selector (GtkWidget *w) |
| 1922 | { | 1929 | { |
| 1923 | GtkFileSelection *filesel = GTK_FILE_SELECTION (w); | 1930 | GtkFileSelection *filesel = GTK_FILE_SELECTION (w); |
| 1924 | return xstrdup ((char*) gtk_file_selection_get_filename (filesel)); | 1931 | return xstrdup (gtk_file_selection_get_filename (filesel)); |
| 1925 | } | 1932 | } |
| 1926 | 1933 | ||
| 1927 | /* Create a file selection dialog. | 1934 | /* Create a file selection dialog. |
| @@ -2039,7 +2046,6 @@ xg_get_file_name (struct frame *f, | |||
| 2039 | 2046 | ||
| 2040 | 2047 | ||
| 2041 | static char *x_last_font_name; | 2048 | static char *x_last_font_name; |
| 2042 | extern Lisp_Object Qxft; | ||
| 2043 | 2049 | ||
| 2044 | /* Pop up a GTK font selector and return the name of the font the user | 2050 | /* Pop up a GTK font selector and return the name of the font the user |
| 2045 | selects, as a C string. The returned font name follows GTK's own | 2051 | selects, as a C string. The returned font name follows GTK's own |
| @@ -2277,7 +2283,7 @@ menuitem_destroy_callback (GtkWidget *w, gpointer client_data) | |||
| 2277 | { | 2283 | { |
| 2278 | if (client_data) | 2284 | if (client_data) |
| 2279 | { | 2285 | { |
| 2280 | xg_menu_item_cb_data *data = (xg_menu_item_cb_data*) client_data; | 2286 | xg_menu_item_cb_data *data = client_data; |
| 2281 | xg_list_remove (&xg_menu_item_cb_list, &data->ptrs); | 2287 | xg_list_remove (&xg_menu_item_cb_list, &data->ptrs); |
| 2282 | xfree (data); | 2288 | xfree (data); |
| 2283 | } | 2289 | } |
| @@ -2301,8 +2307,7 @@ menuitem_highlight_callback (GtkWidget *w, | |||
| 2301 | 2307 | ||
| 2302 | ev.crossing = *event; | 2308 | ev.crossing = *event; |
| 2303 | subwidget = gtk_get_event_widget (&ev); | 2309 | subwidget = gtk_get_event_widget (&ev); |
| 2304 | data = (xg_menu_item_cb_data *) g_object_get_data (G_OBJECT (subwidget), | 2310 | data = g_object_get_data (G_OBJECT (subwidget), XG_ITEM_DATA); |
| 2305 | XG_ITEM_DATA); | ||
| 2306 | if (data) | 2311 | if (data) |
| 2307 | { | 2312 | { |
| 2308 | if (! NILP (data->help) && data->cl_data->highlight_cb) | 2313 | if (! NILP (data->help) && data->cl_data->highlight_cb) |
| @@ -2323,7 +2328,7 @@ menuitem_highlight_callback (GtkWidget *w, | |||
| 2323 | static void | 2328 | static void |
| 2324 | menu_destroy_callback (GtkWidget *w, gpointer client_data) | 2329 | menu_destroy_callback (GtkWidget *w, gpointer client_data) |
| 2325 | { | 2330 | { |
| 2326 | unref_cl_data ((xg_menu_cb_data*) client_data); | 2331 | unref_cl_data (client_data); |
| 2327 | } | 2332 | } |
| 2328 | 2333 | ||
| 2329 | /* Make a GTK widget that contains both UTF8_LABEL and UTF8_KEY (both | 2334 | /* Make a GTK widget that contains both UTF8_LABEL and UTF8_KEY (both |
| @@ -3064,8 +3069,7 @@ xg_update_menu_item (widget_value *val, | |||
| 3064 | else if (val->enabled && ! gtk_widget_get_sensitive (w)) | 3069 | else if (val->enabled && ! gtk_widget_get_sensitive (w)) |
| 3065 | gtk_widget_set_sensitive (w, TRUE); | 3070 | gtk_widget_set_sensitive (w, TRUE); |
| 3066 | 3071 | ||
| 3067 | cb_data = (xg_menu_item_cb_data*) g_object_get_data (G_OBJECT (w), | 3072 | cb_data = g_object_get_data (G_OBJECT (w), XG_ITEM_DATA); |
| 3068 | XG_ITEM_DATA); | ||
| 3069 | if (cb_data) | 3073 | if (cb_data) |
| 3070 | { | 3074 | { |
| 3071 | cb_data->call_data = val->call_data; | 3075 | cb_data->call_data = val->call_data; |
| @@ -3271,8 +3275,7 @@ xg_modify_menubar_widgets (GtkWidget *menubar, struct frame *f, | |||
| 3271 | 3275 | ||
| 3272 | if (! list) return; | 3276 | if (! list) return; |
| 3273 | 3277 | ||
| 3274 | cl_data = (xg_menu_cb_data*) g_object_get_data (G_OBJECT (menubar), | 3278 | cl_data = g_object_get_data (G_OBJECT (menubar), XG_FRAME_DATA); |
| 3275 | XG_FRAME_DATA); | ||
| 3276 | 3279 | ||
| 3277 | xg_update_menubar (menubar, f, &list, list, 0, val->contents, | 3280 | xg_update_menubar (menubar, f, &list, list, 0, val->contents, |
| 3278 | select_cb, deactivate_cb, highlight_cb, cl_data); | 3281 | select_cb, deactivate_cb, highlight_cb, cl_data); |
| @@ -3336,7 +3339,7 @@ static void | |||
| 3336 | menubar_map_cb (GtkWidget *w, gpointer user_data) | 3339 | menubar_map_cb (GtkWidget *w, gpointer user_data) |
| 3337 | { | 3340 | { |
| 3338 | GtkRequisition req; | 3341 | GtkRequisition req; |
| 3339 | struct frame *f = (struct frame *) user_data; | 3342 | struct frame *f = user_data; |
| 3340 | gtk_widget_get_preferred_size (w, NULL, &req); | 3343 | gtk_widget_get_preferred_size (w, NULL, &req); |
| 3341 | if (FRAME_MENUBAR_HEIGHT (f) != req.height) | 3344 | if (FRAME_MENUBAR_HEIGHT (f) != req.height) |
| 3342 | { | 3345 | { |
| @@ -3742,14 +3745,11 @@ xg_update_scrollbar_pos (struct frame *f, | |||
| 3742 | gtk_widget_queue_draw (wfixed); | 3745 | gtk_widget_queue_draw (wfixed); |
| 3743 | gdk_window_process_all_updates (); | 3746 | gdk_window_process_all_updates (); |
| 3744 | if (oldx != -1 && oldw > 0 && oldh > 0) | 3747 | if (oldx != -1 && oldw > 0 && oldh > 0) |
| 3745 | { | 3748 | /* Clear under old scroll bar position. This must be done after |
| 3746 | /* Clear under old scroll bar position. This must be done after | 3749 | the gtk_widget_queue_draw and gdk_window_process_all_updates |
| 3747 | the gtk_widget_queue_draw and gdk_window_process_all_updates | 3750 | above. */ |
| 3748 | above. */ | 3751 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
| 3749 | x_clear_area (FRAME_X_DISPLAY (f), | 3752 | oldx, oldy, oldw, oldh); |
| 3750 | FRAME_X_WINDOW (f), | ||
| 3751 | oldx, oldy, oldw, oldh, 0); | ||
| 3752 | } | ||
| 3753 | 3753 | ||
| 3754 | /* GTK does not redraw until the main loop is entered again, but | 3754 | /* GTK does not redraw until the main loop is entered again, but |
| 3755 | if there are no X events pending we will not enter it. So we sync | 3755 | if there are no X events pending we will not enter it. So we sync |
| @@ -3783,7 +3783,7 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, | |||
| 3783 | 3783 | ||
| 3784 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); | 3784 | struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); |
| 3785 | 3785 | ||
| 3786 | if (wscroll && NILP (bar->dragging)) | 3786 | if (wscroll && bar->dragging == -1) |
| 3787 | { | 3787 | { |
| 3788 | GtkAdjustment *adj; | 3788 | GtkAdjustment *adj; |
| 3789 | gdouble shown; | 3789 | gdouble shown; |
| @@ -3946,8 +3946,7 @@ xg_tool_bar_callback (GtkWidget *w, gpointer client_data) | |||
| 3946 | gpointer gmod = g_object_get_data (G_OBJECT (w), XG_TOOL_BAR_LAST_MODIFIER); | 3946 | gpointer gmod = g_object_get_data (G_OBJECT (w), XG_TOOL_BAR_LAST_MODIFIER); |
| 3947 | intptr_t mod = (intptr_t) gmod; | 3947 | intptr_t mod = (intptr_t) gmod; |
| 3948 | 3948 | ||
| 3949 | struct frame *f = (struct frame *) g_object_get_data (G_OBJECT (w), | 3949 | struct frame *f = g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); |
| 3950 | XG_FRAME_DATA); | ||
| 3951 | Lisp_Object key, frame; | 3950 | Lisp_Object key, frame; |
| 3952 | struct input_event event; | 3951 | struct input_event event; |
| 3953 | EVENT_INIT (event); | 3952 | EVENT_INIT (event); |
| @@ -4020,8 +4019,8 @@ static GtkWidget * | |||
| 4020 | xg_get_tool_bar_widgets (GtkWidget *vb, GtkWidget **wimage) | 4019 | xg_get_tool_bar_widgets (GtkWidget *vb, GtkWidget **wimage) |
| 4021 | { | 4020 | { |
| 4022 | GList *clist = gtk_container_get_children (GTK_CONTAINER (vb)); | 4021 | GList *clist = gtk_container_get_children (GTK_CONTAINER (vb)); |
| 4023 | GtkWidget *c1 = (GtkWidget *) clist->data; | 4022 | GtkWidget *c1 = clist->data; |
| 4024 | GtkWidget *c2 = clist->next ? (GtkWidget *) clist->next->data : NULL; | 4023 | GtkWidget *c2 = clist->next ? clist->next->data : NULL; |
| 4025 | 4024 | ||
| 4026 | *wimage = GTK_IS_IMAGE (c1) ? c1 : c2; | 4025 | *wimage = GTK_IS_IMAGE (c1) ? c1 : c2; |
| 4027 | g_list_free (clist); | 4026 | g_list_free (clist); |
| @@ -4150,7 +4149,7 @@ xg_tool_bar_detach_callback (GtkHandleBox *wbox, | |||
| 4150 | GtkWidget *w, | 4149 | GtkWidget *w, |
| 4151 | gpointer client_data) | 4150 | gpointer client_data) |
| 4152 | { | 4151 | { |
| 4153 | struct frame *f = (struct frame *) client_data; | 4152 | struct frame *f = client_data; |
| 4154 | 4153 | ||
| 4155 | g_object_set (G_OBJECT (w), "show-arrow", !x_gtk_whole_detached_tool_bar, | 4154 | g_object_set (G_OBJECT (w), "show-arrow", !x_gtk_whole_detached_tool_bar, |
| 4156 | NULL); | 4155 | NULL); |
| @@ -4187,7 +4186,7 @@ xg_tool_bar_attach_callback (GtkHandleBox *wbox, | |||
| 4187 | GtkWidget *w, | 4186 | GtkWidget *w, |
| 4188 | gpointer client_data) | 4187 | gpointer client_data) |
| 4189 | { | 4188 | { |
| 4190 | struct frame *f = (struct frame *) client_data; | 4189 | struct frame *f = client_data; |
| 4191 | g_object_set (G_OBJECT (w), "show-arrow", TRUE, NULL); | 4190 | g_object_set (G_OBJECT (w), "show-arrow", TRUE, NULL); |
| 4192 | 4191 | ||
| 4193 | if (f) | 4192 | if (f) |
| @@ -4225,8 +4224,7 @@ xg_tool_bar_help_callback (GtkWidget *w, | |||
| 4225 | gpointer client_data) | 4224 | gpointer client_data) |
| 4226 | { | 4225 | { |
| 4227 | intptr_t idx = (intptr_t) client_data; | 4226 | intptr_t idx = (intptr_t) client_data; |
| 4228 | struct frame *f = (struct frame *) g_object_get_data (G_OBJECT (w), | 4227 | struct frame *f = g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); |
| 4229 | XG_FRAME_DATA); | ||
| 4230 | Lisp_Object help, frame; | 4228 | Lisp_Object help, frame; |
| 4231 | 4229 | ||
| 4232 | if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items)) | 4230 | if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items)) |
| @@ -4366,7 +4364,7 @@ tb_size_cb (GtkWidget *widget, | |||
| 4366 | /* When tool bar is created it has one preferred size. But when size is | 4364 | /* When tool bar is created it has one preferred size. But when size is |
| 4367 | allocated between widgets, it may get another. So we must update | 4365 | allocated between widgets, it may get another. So we must update |
| 4368 | size hints if tool bar size changes. Seen on Fedora 18 at least. */ | 4366 | size hints if tool bar size changes. Seen on Fedora 18 at least. */ |
| 4369 | struct frame *f = (struct frame *) user_data; | 4367 | struct frame *f = user_data; |
| 4370 | if (xg_update_tool_bar_sizes (f)) | 4368 | if (xg_update_tool_bar_sizes (f)) |
| 4371 | x_wm_set_size_hint (f, 0, 0); | 4369 | x_wm_set_size_hint (f, 0, 0); |
| 4372 | } | 4370 | } |
| @@ -5038,10 +5036,10 @@ xg_initialize (void) | |||
| 5038 | (gdk_display_get_default ())); | 5036 | (gdk_display_get_default ())); |
| 5039 | /* Remove F10 as a menu accelerator, it does not mix well with Emacs key | 5037 | /* Remove F10 as a menu accelerator, it does not mix well with Emacs key |
| 5040 | bindings. It doesn't seem to be any way to remove properties, | 5038 | bindings. It doesn't seem to be any way to remove properties, |
| 5041 | so we set it to VoidSymbol which in X means "no key". */ | 5039 | so we set it to "" which in means "no key". */ |
| 5042 | gtk_settings_set_string_property (settings, | 5040 | gtk_settings_set_string_property (settings, |
| 5043 | "gtk-menu-bar-accel", | 5041 | "gtk-menu-bar-accel", |
| 5044 | "VoidSymbol", | 5042 | "", |
| 5045 | EMACS_CLASS); | 5043 | EMACS_CLASS); |
| 5046 | 5044 | ||
| 5047 | /* Make GTK text input widgets use Emacs style keybindings. This is | 5045 | /* Make GTK text input widgets use Emacs style keybindings. This is |