diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/gtkutil.c | 17 | ||||
| -rw-r--r-- | src/keyboard.c | 3 |
3 files changed, 29 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 82cc8f0f552..8b1c429e406 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2013-02-14 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * gtkutil.c (tb_size_cb): New function. | ||
| 4 | (xg_create_tool_bar): Connect size-allocate to tb_size_cb (Bug#13512). | ||
| 5 | |||
| 6 | 2013-02-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 7 | |||
| 8 | * keyboard.c (active_maps): Fcurrent_active_maps expects a position, not | ||
| 9 | an event. | ||
| 10 | |||
| 1 | 2013-02-13 Stefan Monnier <monnier@iro.umontreal.ca> | 11 | 2013-02-13 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 12 | ||
| 3 | * keyboard.c (syms_of_keyboard): Further tweaks of docstring. | 13 | * keyboard.c (syms_of_keyboard): Further tweaks of docstring. |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 4771d34b4a0..d6e4dcebcd3 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -4353,6 +4353,21 @@ xg_pack_tool_bar (FRAME_PTR f, Lisp_Object pos) | |||
| 4353 | x->toolbar_is_packed = true; | 4353 | x->toolbar_is_packed = true; |
| 4354 | } | 4354 | } |
| 4355 | 4355 | ||
| 4356 | static bool xg_update_tool_bar_sizes (FRAME_PTR f); | ||
| 4357 | |||
| 4358 | static void | ||
| 4359 | tb_size_cb (GtkWidget *widget, | ||
| 4360 | GdkRectangle *allocation, | ||
| 4361 | gpointer user_data) | ||
| 4362 | { | ||
| 4363 | /* When tool bar is created it has one preferred size. But when size is | ||
| 4364 | allocated between widgets, it may get another. So we must update | ||
| 4365 | size hints if tool bar size changes. Seen on Fedora 18 at least. */ | ||
| 4366 | FRAME_PTR f = (FRAME_PTR) user_data; | ||
| 4367 | if (xg_update_tool_bar_sizes (f)) | ||
| 4368 | x_wm_set_size_hint (f, 0, 0); | ||
| 4369 | } | ||
| 4370 | |||
| 4356 | /* Create a tool bar for frame F. */ | 4371 | /* Create a tool bar for frame F. */ |
| 4357 | 4372 | ||
| 4358 | static void | 4373 | static void |
| @@ -4384,6 +4399,8 @@ xg_create_tool_bar (FRAME_PTR f) | |||
| 4384 | 4399 | ||
| 4385 | gtk_toolbar_set_style (GTK_TOOLBAR (x->toolbar_widget), GTK_TOOLBAR_ICONS); | 4400 | gtk_toolbar_set_style (GTK_TOOLBAR (x->toolbar_widget), GTK_TOOLBAR_ICONS); |
| 4386 | toolbar_set_orientation (x->toolbar_widget, GTK_ORIENTATION_HORIZONTAL); | 4401 | toolbar_set_orientation (x->toolbar_widget, GTK_ORIENTATION_HORIZONTAL); |
| 4402 | g_signal_connect (x->toolbar_widget, "size-allocate", | ||
| 4403 | G_CALLBACK (tb_size_cb), f); | ||
| 4387 | #if GTK_CHECK_VERSION (3, 3, 6) | 4404 | #if GTK_CHECK_VERSION (3, 3, 6) |
| 4388 | gsty = gtk_widget_get_style_context (x->toolbar_widget); | 4405 | gsty = gtk_widget_get_style_context (x->toolbar_widget); |
| 4389 | gtk_style_context_add_class (gsty, "primary-toolbar"); | 4406 | gtk_style_context_add_class (gsty, "primary-toolbar"); |
diff --git a/src/keyboard.c b/src/keyboard.c index 3e1a6ba3346..5cd7e8473d2 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -8663,7 +8663,8 @@ follow_key (Lisp_Object keymap, Lisp_Object key) | |||
| 8663 | static Lisp_Object | 8663 | static Lisp_Object |
| 8664 | active_maps (Lisp_Object first_event) | 8664 | active_maps (Lisp_Object first_event) |
| 8665 | { | 8665 | { |
| 8666 | Lisp_Object position = INTEGERP (first_event) ? Qnil : first_event; | 8666 | Lisp_Object position |
| 8667 | = CONSP (first_event) ? CAR_SAFE (XCDR (first_event)) : Qnil; | ||
| 8667 | return Fcons (Qkeymap, Fcurrent_active_maps (Qt, position)); | 8668 | return Fcons (Qkeymap, Fcurrent_active_maps (Qt, position)); |
| 8668 | } | 8669 | } |
| 8669 | 8670 | ||