bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion

classic Classic list List threaded Threaded
87 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion

David Engster
I've compiled from the emacs-25 branch (f146ea73a9ca6) simply with
'./configure' (output see below), but I've also seen this problem with
Emacs 24.5.

I do the following:

- emacs -Q

- Enter in the scratch buffer

  (custom-set-faces
    '(default ((t (:height 100 :family "DejaVu Sans Mono")))))
  (set-frame-width nil 60)

- Run 'M-x dired'

What I see:

- The frame width suddenly becomes wider (to 78 characters)

- In the console output, I see

  (emacs:27459): Gtk-CRITICAL **: gtk_distribute_natural_allocation: assertion 'extra_space >= 0' failed

- I also see this assertion when I resize the frame with the mouse to a
  smaller width than those 78 characters.

- I do *not* have these problems with a bitmap font like "Terminus".

- I also do *not* have these problems with a Lucid build.

This is on a Debian 8 machine with GTK '3.14.5-1+deb8u1'.

Configure output:

Configured for 'x86_64-unknown-linux-gnu'.
                     
  Where should the build process find the source code?    .
  What compiler should emacs be built with?               gcc -std=gnu99 -g3 -O2
  Should Emacs use the GNU version of malloc?             yes
      (Using Doug Lea's new malloc from the GNU C Library.)
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         no
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          GTK3
  Where do we find X Windows header files?                Standard dirs
  Where do we find X Windows libraries?                   Standard dirs
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   yes
  Does Emacs use -ljpeg?                                  yes
  Does Emacs use -ltiff?                                  yes
  Does Emacs use a gif library?                           yes -lgif
  Does Emacs use a png library?                           yes -lpng12
  Does Emacs use -lrsvg-2?                                yes
  Does Emacs use cairo?                                   no
  Does Emacs use imagemagick?                             yes
  Does Emacs support sound?                               yes
  Does Emacs use -lgpm?                                   yes
  Does Emacs use -ldbus?                                  yes
  Does Emacs use -lgconf?                                 no
  Does Emacs use GSettings?                               yes
  Does Emacs use a file notification library?             yes -lglibc (inotify)
  Does Emacs use access control lists?                    no
  Does Emacs use -lselinux?                               no
  Does Emacs use -lgnutls?                                yes
  Does Emacs use -lxml2?                                  yes
  Does Emacs use -lfreetype?                              yes
  Does Emacs use -lm17n-flt?                              yes
  Does Emacs use -lotf?                                   yes
  Does Emacs use -lxft?                                   yes
  Does Emacs directly use zlib?                           yes
  Does Emacs have dynamic modules support?                no
  Does Emacs use toolkit scroll bars?                     yes



Reply | Threaded
Open this post in threaded view
|

bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion

martin rudalics
 > - In the console output, I see
 >
 >    (emacs:27459): Gtk-CRITICAL **: gtk_distribute_natural_allocation: assertion 'extra_space >= 0' failed
 >
 > - I also see this assertion when I resize the frame with the mouse to a
 >    smaller width than those 78 characters.

Does it also happen with ‘frame-resize-pixelwise’ non-nil?

martin




Reply | Threaded
Open this post in threaded view
|

bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion

David Engster
martin rudalics writes:

>> - In the console output, I see
>>
>>    (emacs:27459): Gtk-CRITICAL **:
>> gtk_distribute_natural_allocation: assertion 'extra_space >= 0'
>> failed
>>
>> - I also see this assertion when I resize the frame with the mouse to a
>>    smaller width than those 78 characters.
>
> Does it also happen with ‘frame-resize-pixelwise’ non-nil?
Yes. But at least I know now what really triggers this problem: GTK
throws this assertion when the menubar is not completely visible. This
is also why running Dired triggers this, because it adds a bunch of
additional menu entries. The frame is then resized so that the menu-bar
fits.

I also have to correct myself: The font doesn't seem to have anything to
do with it; it also happens with Bitmap fonts, it was just by chance
that this configuration had the menu-bar disabled.

I realized that the menu-bar is the reason by putting a breakpoint into
g_log through which the assertion is displayed, and you see that
gtk_menu_bar_size_allocate is actually triggering this. I attached the
full and normal backtrace to this file (xbacktrace is empty).

-David


#0  g_log (log_domain=log_domain@entry=0x7ffff6db7edf "Gtk", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL,
    format=format@entry=0x7ffff5185e25 "%s: assertion '%s' failed") at /tmp/buildd/glib2.0-2.42.1/./glib/gmessages.c:1075
#1  0x00007ffff513bfa9 in g_return_if_fail_warning (log_domain=log_domain@entry=0x7ffff6db7edf "Gtk",
    pretty_function=pretty_function@entry=0x7ffff6e121c0 <__FUNCTION__.35024> "gtk_distribute_natural_allocation",
    expression=expression@entry=0x7ffff6e11e07 "extra_space >= 0") at /tmp/buildd/glib2.0-2.42.1/./glib/gmessages.c:1088
#2  0x00007ffff6cb685a in gtk_distribute_natural_allocation (extra_space=-9, n_requested_sizes=<optimized out>, sizes=<optimized out>)
    at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtksizerequest.c:801
#3  0x00007ffff6c45828 in gtk_menu_bar_size_allocate (widget=<optimized out>, allocation=<optimized out>) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkmenubar.c:544
#4  0x00007ffff540d233 in g_cclosure_marshal_VOID__BOXEDv (closure=0x1672600, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>,
    marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x1603f50) at /tmp/buildd/glib2.0-2.42.1/./gobject/gmarshal.c:1160
#5  0x00007ffff540a3c2 in _g_closure_invoke_va (closure=0x7ffff6db7edf, closure@entry=0x1672600, return_value=0x8, return_value@entry=0x0, instance=0x7ffff5185e25,
    instance@entry=0x199a400, args=0x7ffff6e121c0 <__FUNCTION__.35024>, args@entry=0x7fffffffb9e0, n_params=-153018873, param_types=0x1682470)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gclosure.c:831
#6  0x00007ffff5424087 in g_signal_emit_valist (instance=0x199a400, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffb9e0)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3218
#7  0x00007ffff54249df in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3365
#8  0x00007ffff6d67de7 in gtk_widget_size_allocate_with_baseline (widget=0x199a400, allocation=0x0, baseline=-1) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwidget.c:6075
#9  0x00007ffff6b3e21d in gtk_box_size_allocate_no_center (widget=0x7fffdc00a660, allocation=0x7fffffffc050) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkbox.c:800
#10 0x00007ffff540d233 in g_cclosure_marshal_VOID__BOXEDv (closure=0x1672600, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>,
    marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x1603f50) at /tmp/buildd/glib2.0-2.42.1/./gobject/gmarshal.c:1160
#11 0x00007ffff540a3c2 in _g_closure_invoke_va (closure=0x7ffff6db7edf, closure@entry=0x1672600, return_value=0x8, return_value@entry=0x0, instance=0x7ffff5185e25,
    instance@entry=0x7fffdc00a660, args=0x7ffff6e121c0 <__FUNCTION__.35024>, args@entry=0x7fffffffbf10, n_params=-153018873, param_types=0x1682470)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gclosure.c:831
#12 0x00007ffff5424087 in g_signal_emit_valist (instance=0x7fffdc00a660, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffbf10)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3218
#13 0x00007ffff54249df in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3365
#14 0x00007ffff6d67de7 in gtk_widget_size_allocate_with_baseline (widget=0x7fffdc00a660, allocation=0x0, baseline=-1)
    at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwidget.c:6075
#15 0x00007ffff6d681aa in gtk_widget_size_allocate (widget=widget@entry=0x7fffdc00a660, allocation=allocation@entry=0x7fffffffc0d0)
    at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwidget.c:6151
#16 0x00007ffff6d7e4d3 in gtk_window_size_allocate (widget=<optimized out>, allocation=<optimized out>) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwindow.c:7309
#17 0x00007ffff540a245 in g_closure_invoke (closure=0x1672600, return_value=0x0, n_param_values=2, param_values=0x7fffffffc2d0, invocation_hint=0x7fffffffc270)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gclosure.c:768
#18 0x00007ffff541b83b in signal_emit_unlocked_R (node=node@entry=0x1603ee0, detail=detail@entry=0, instance=instance@entry=0x1996240,
    emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffc2d0) at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3483
#19 0x00007ffff5424778 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffc460)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3309
#20 0x00007ffff54249df in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3365
#21 0x00007ffff6d67de7 in gtk_widget_size_allocate_with_baseline (widget=0x1996240, allocation=0x0, baseline=-1) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwidget.c:6075
#22 0x00007ffff6d681aa in gtk_widget_size_allocate (widget=widget@entry=0x1996240, allocation=allocation@entry=0x7fffffffc690)
    at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwidget.c:6151
#23 0x00007ffff6d78811 in gtk_window_move_resize (window=0x1996240) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwindow.c:9147
#24 gtk_window_check_resize (container=0x1996240) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwindow.c:7916
#25 0x00007ffff540a474 in _g_closure_invoke_va (closure=0x7ffff6db7edf, closure@entry=0x167b5c0, return_value=0x8, return_value@entry=0x0, instance=0x7ffff5185e25,
    instance@entry=0x1996240, args=0x7ffff6e121c0 <__FUNCTION__.35024>, args@entry=0x7fffffffc900, n_params=-153018873, param_types=0x1682470)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gclosure.c:831
---Type <return> to continue, or q <return> to quit---
#26 0x00007ffff5424087 in g_signal_emit_valist (instance=0x1996240, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffc900)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3218
#27 0x00007ffff54249df in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3365
#28 0x00007ffff6b821fc in gtk_container_idle_sizer (clock=0x170b250, container=0x1996240) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkcontainer.c:1755
#29 0x00007ffff540a474 in _g_closure_invoke_va (closure=0x7ffff6db7edf, closure@entry=0x1e53780, return_value=0x8, return_value@entry=0x0, instance=0x7ffff5185e25,
    instance@entry=0x170b250, args=0x7ffff6e121c0 <__FUNCTION__.35024>, args@entry=0x7fffffffcc48, n_params=-153018873, param_types=0x1682470)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gclosure.c:831
#30 0x00007ffff5424087 in g_signal_emit_valist (instance=0x170b250, signal_id=<optimized out>, detail=0, var_args=0x7fffffffcc48)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3218
#31 0x00007ffff5424f2a in g_signal_emit_by_name (instance=0x7ffff6db7edf, instance@entry=0x170b250, detailed_signal=0x8 <error: Cannot access memory at address 0x8>,
    detailed_signal@entry=0x7ffff681b736 "layout") at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3405
#32 0x00007ffff67b5974 in gdk_frame_clock_paint_idle (data=0x170b250) at /tmp/buildd/gtk+3.0-3.14.5/./gdk/gdkframeclockidle.c:408
#33 0x00007ffff67a7e78 in gdk_threads_dispatch (data=0x1860b40, data@entry=<error reading variable: value has been optimized out>)
    at /tmp/buildd/gtk+3.0-3.14.5/./gdk/gdk.c:654
#34 0x00007ffff5135613 in g_timeout_dispatch (source=0x1e58820, callback=<optimized out>, user_data=<optimized out>) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:4520
#35 0x00007ffff5134b6d in g_main_dispatch (context=0x16eacf0) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3111
#36 g_main_context_dispatch (context=context@entry=0x16eacf0) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3710
#37 0x00007ffff5134f48 in g_main_context_iterate (context=context@entry=0x16eacf0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3781
#38 0x00007ffff5134ffc in g_main_context_iteration (context=0x16eacf0, context@entry=0x0, may_block=may_block@entry=1) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3842
#39 0x00007ffff6c2dcc5 in gtk_main_iteration () at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkmain.c:1308
#40 0x0000000000545c63 in XTread_socket (terminal=0x12fdb80, hold_quit=0x7fffffffcf60) at xterm.c:8775
#41 0x0000000000592262 in gobble_input () at keyboard.c:6771
#42 0x00000000005927e7 in handle_async_input () at keyboard.c:7023
#43 0x0000000000592806 in process_pending_signals () at keyboard.c:7037
#44 0x0000000000604c49 in Fmake_list (length=0, init=0) at alloc.c:2705
#45 0x00000000006361fb in concat (nargs=1, args=0x7fffffffd1a8, target_type=Lisp_Cons, last_special=false) at fns.c:633
#46 0x0000000000635b9a in Fcopy_sequence (arg=22459043) at fns.c:501
#47 0x000000000058c928 in timer_check () at keyboard.c:4447
#48 0x000000000058a0f6 in readable_events (flags=1) at keyboard.c:3304
#49 0x00000000005920ac in get_input_pending (flags=1) at keyboard.c:6686
#50 0x0000000000599894 in detect_input_pending_run_timers (do_display=true) at keyboard.c:9817
#51 0x000000000068a0db in wait_reading_process_output (time_limit=0, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=0, wait_proc=0x0, just_wait_proc=0)
    at process.c:4963
#52 0x000000000058b16c in kbd_buffer_get_event (kbp=0x7fffffffd818, used_mouse_menu=0x7fffffffddff, end_time=0x0) at keyboard.c:3795
#53 0x0000000000586701 in read_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fffffffdbc0, used_mouse_menu=0x7fffffffddff) at keyboard.c:2121
#54 0x00000000005869d0 in read_decoded_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fffffffdbc0, prev_event=0, used_mouse_menu=0x7fffffffddff)
    at keyboard.c:2184
#55 0x000000000058863c in read_char (commandflag=1, map=30806627, prev_event=0, used_mouse_menu=0x7fffffffddff, end_time=0x0) at keyboard.c:2779
#56 0x0000000000597c93 in read_key_sequence (keybuf=0x7fffffffdfb0, bufsize=30, prompt=0, dont_downcase_last=false, can_return_switch_frame=true,
    fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9018
#57 0x00000000005846af in command_loop_1 () at keyboard.c:1343
#58 0x000000000062d0e3 in internal_condition_case (bfun=0x58426d <command_loop_1>, handlers=18912, hfun=0x5838db <cmd_error>) at eval.c:1309
#59 0x0000000000583e9b in command_loop_2 (ignore=0) at keyboard.c:1086
#60 0x000000000062c68d in internal_catch (tag=45696, func=0x583e72 <command_loop_2>, arg=0) at eval.c:1074
#61 0x0000000000583e3b in command_loop () at keyboard.c:1065
#62 0x00000000005833ba in recursive_edit_1 () at keyboard.c:671
#63 0x00000000005835c5 in Frecursive_edit () at keyboard.c:742
---Type <return> to continue, or q <return> to quit---
#64 0x00000000005813d8 in main (argc=2, argv=0x7fffffffe438) at emacs.c:1656

bt full
#0  g_log (log_domain=log_domain@entry=0x7ffff6db7edf "Gtk", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL,
    format=format@entry=0x7ffff5185e25 "%s: assertion '%s' failed") at /tmp/buildd/glib2.0-2.42.1/./glib/gmessages.c:1075
        args = {{
            gp_offset = 0,
            fp_offset = 0,
            overflow_arg_area = 0x1631580,
            reg_save_area = 0x7fffffffb600
          }}
#1  0x00007ffff513bfa9 in g_return_if_fail_warning (log_domain=log_domain@entry=0x7ffff6db7edf "Gtk",
    pretty_function=pretty_function@entry=0x7ffff6e121c0 <__FUNCTION__.35024> "gtk_distribute_natural_allocation",
    expression=expression@entry=0x7ffff6e11e07 "extra_space >= 0") at /tmp/buildd/glib2.0-2.42.1/./glib/gmessages.c:1088
No locals.
#2  0x00007ffff6cb685a in gtk_distribute_natural_allocation (extra_space=-9, n_requested_sizes=<optimized out>, sizes=<optimized out>)
    at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtksizerequest.c:801
        spreading = <optimized out>
        i = <optimized out>
        __FUNCTION__ = "gtk_distribute_natural_allocation"
#3  0x00007ffff6c45828 in gtk_menu_bar_size_allocate (widget=<optimized out>, allocation=<optimized out>) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkmenubar.c:544
        size = <optimized out>
        ltr = 1
        context = <optimized out>
        flags = <optimized out>
        border = {
          left = 0,
          right = 0,
          top = 0,
          bottom = 0
        }
        menu_bar = <optimized out>
        menu_shell = <optimized out>
        priv = <optimized out>
        child = <optimized out>
        children = <optimized out>
        remaining_space = {
          x = 0,
          y = <optimized out>,
          width = 443,
          height = 24
        }
        border_width = <optimized out>
        requested_sizes = 0xe53090
        toggle_size = 0
        i = <optimized out>
        __FUNCTION__ = "gtk_menu_bar_size_allocate"
#4  0x00007ffff540d233 in g_cclosure_marshal_VOID__BOXEDv (closure=0x1672600, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>,
    marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x1603f50) at /tmp/buildd/glib2.0-2.42.1/./gobject/gmarshal.c:1160
        cc = 0x1672600
        data1 = <optimized out>
        data2 = <optimized out>
---Type <return> to continue, or q <return> to quit---
        callback = <optimized out>
        arg0 = 0x7fffffffbb20
        args_copy = {{
            gp_offset = 32,
            fp_offset = 48,
            overflow_arg_area = 0x7fffffffbac0,
            reg_save_area = 0x7fffffffba00
          }}
#5  0x00007ffff540a3c2 in _g_closure_invoke_va (closure=0x7ffff6db7edf, closure@entry=0x1672600, return_value=0x8, return_value@entry=0x0, instance=0x7ffff5185e25,
    instance@entry=0x199a400, args=0x7ffff6e121c0 <__FUNCTION__.35024>, args@entry=0x7fffffffb9e0, n_params=-153018873, param_types=0x1682470)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gclosure.c:831
        marshal = 0x0
        marshal_data = 0x7ffff6e11e07
        __FUNCTION__ = "_g_closure_invoke_va"
#6  0x00007ffff5424087 in g_signal_emit_valist (instance=0x199a400, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffb9e0)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3218
        return_accu = <optimized out>
        accu = {
          g_type = 0,
          data = {{
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }, {
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }}
        }
        accumulator = 0x0
        emission = {
          next = 0x7fffffffbe50,
          instance = 0x199a400,
          ihint = {
            signal_id = 10,
            detail = 0,
            run_type = G_SIGNAL_RUN_FIRST
---Type <return> to continue, or q <return> to quit---
          },
          state = EMISSION_RUN,
          chain_type = 24923888
        }
        signal_id = 10
        instance_type = <optimized out>
        emission_return = {
          g_type = 0,
          data = {{
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }, {
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }}
        }
        rtype = 4
        static_scope = 0
        fastpath_handler = <optimized out>
        closure = 0x1672600
        run_type = <optimized out>
        l = <optimized out>
        fastpath = <optimized out>
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __FUNCTION__ = "g_signal_emit_valist"
#7  0x00007ffff54249df in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3365
        var_args = {{
            gp_offset = 24,
            fp_offset = 48,
            overflow_arg_area = 0x7fffffffbac0,
---Type <return> to continue, or q <return> to quit---
            reg_save_area = 0x7fffffffba00
          }}
#8  0x00007ffff6d67de7 in gtk_widget_size_allocate_with_baseline (widget=0x199a400, allocation=0x0, baseline=-1) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwidget.c:6075
        priv = 0x199a320
        real_allocation = {
          x = 0,
          y = 0,
          width = 443,
          height = 24
        }
        old_clip = {
          x = 0,
          y = 0,
          width = 452,
          height = 24
        }
        adjusted_allocation = {
          x = 0,
          y = 0,
          width = 443,
          height = 24
        }
        size_changed = 1
        baseline_changed = 0
        position_changed = 0
        natural_width = 452
        natural_height = 24
        dummy = 32767
        min_width = 452
        min_height = 24
        __FUNCTION__ = "gtk_widget_size_allocate_with_baseline"
#9  0x00007ffff6b3e21d in gtk_box_size_allocate_no_center (widget=0x7fffdc00a660, allocation=0x7fffffffc050) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkbox.c:800
        box = 0x7fffdc00a660
        private = 0x7fffdc00a540
        child = 0x1b05480
        children = 0x18512c0
        nvis_children = 3
        nexpand_children = 1
        direction = GTK_TEXT_DIR_LTR
        child_allocation = {
          x = 0,
          y = 0,
          width = 443,
          height = 24
        }
        sizes = 0x7fffffffbba0
        child_minimum_baseline = 0
        child_natural_baseline = 0
        minimum_above = <optimized out>
---Type <return> to continue, or q <return> to quit---
        natural_above = <optimized out>
        minimum_below = <optimized out>
        natural_below = <optimized out>
        have_baseline = <optimized out>
        baseline = -1
        packing = GTK_PACK_START
        size = <optimized out>
        extra = <optimized out>
        n_extra_widgets = <optimized out>
        x = 0
        y = 24
        i = 0
        child_size = <optimized out>
#10 0x00007ffff540d233 in g_cclosure_marshal_VOID__BOXEDv (closure=0x1672600, return_value=<optimized out>, instance=<optimized out>, args=<optimized out>,
    marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x1603f50) at /tmp/buildd/glib2.0-2.42.1/./gobject/gmarshal.c:1160
        cc = 0x1672600
        data1 = <optimized out>
        data2 = <optimized out>
        callback = <optimized out>
        arg0 = 0x7fffffffc050
        args_copy = {{
            gp_offset = 32,
            fp_offset = 48,
            overflow_arg_area = 0x7fffffffbff0,
            reg_save_area = 0x7fffffffbf30
          }}
#11 0x00007ffff540a3c2 in _g_closure_invoke_va (closure=0x7ffff6db7edf, closure@entry=0x1672600, return_value=0x8, return_value@entry=0x0, instance=0x7ffff5185e25,
    instance@entry=0x7fffdc00a660, args=0x7ffff6e121c0 <__FUNCTION__.35024>, args@entry=0x7fffffffbf10, n_params=-153018873, param_types=0x1682470)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gclosure.c:831
        marshal = 0x0
        marshal_data = 0x7ffff6e11e07
        __FUNCTION__ = "_g_closure_invoke_va"
#12 0x00007ffff5424087 in g_signal_emit_valist (instance=0x7fffdc00a660, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffbf10)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3218
        return_accu = <optimized out>
        accu = {
          g_type = 0,
          data = {{
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }, {
              v_int = 0,
---Type <return> to continue, or q <return> to quit---
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }}
        }
        accumulator = 0x0
        emission = {
          next = 0x7fffffffc260,
          instance = 0x7fffdc00a660,
          ihint = {
            signal_id = 10,
            detail = 0,
            run_type = G_SIGNAL_RUN_FIRST
          },
          state = EMISSION_RUN,
          chain_type = 26249584
        }
        signal_id = 10
        instance_type = <optimized out>
        emission_return = {
          g_type = 0,
          data = {{
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }, {
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }}
        }
        rtype = 4
---Type <return> to continue, or q <return> to quit---
        static_scope = 0
        fastpath_handler = <optimized out>
        closure = 0x1672600
        run_type = <optimized out>
        l = <optimized out>
        fastpath = <optimized out>
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __FUNCTION__ = "g_signal_emit_valist"
#13 0x00007ffff54249df in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3365
        var_args = {{
            gp_offset = 24,
            fp_offset = 48,
            overflow_arg_area = 0x7fffffffbff0,
            reg_save_area = 0x7fffffffbf30
          }}
#14 0x00007ffff6d67de7 in gtk_widget_size_allocate_with_baseline (widget=0x7fffdc00a660, allocation=0x0, baseline=-1)
    at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwidget.c:6075
        priv = 0x7fffdc00a580
        real_allocation = {
          x = 0,
          y = 0,
          width = 443,
          height = 627
        }
        old_clip = {
          x = 0,
          y = 0,
          width = 452,
          height = 627
        }
        adjusted_allocation = {
          x = 0,
          y = 0,
          width = 443,
          height = 627
        }
        size_changed = 1
        baseline_changed = 0
        position_changed = 0
        natural_width = 533
        natural_height = 156
        dummy = 32767
        min_width = 452
        min_height = 156
---Type <return> to continue, or q <return> to quit---
        __FUNCTION__ = "gtk_widget_size_allocate_with_baseline"
#15 0x00007ffff6d681aa in gtk_widget_size_allocate (widget=widget@entry=0x7fffdc00a660, allocation=allocation@entry=0x7fffffffc0d0)
    at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwidget.c:6151
No locals.
#16 0x00007ffff6d7e4d3 in gtk_window_size_allocate (widget=<optimized out>, allocation=<optimized out>) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwindow.c:7309
        window = <optimized out>
        child = 0x7fffdc00a660
        child_allocation = {
          x = 0,
          y = 0,
          width = 443,
          height = 627
        }
#17 0x00007ffff540a245 in g_closure_invoke (closure=0x1672600, return_value=0x0, n_param_values=2, param_values=0x7fffffffc2d0, invocation_hint=0x7fffffffc270)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gclosure.c:768
        marshal = <optimized out>
        marshal_data = <optimized out>
        in_marshal = 0
        real_closure = 0x16725e0
        __FUNCTION__ = "g_closure_invoke"
#18 0x00007ffff541b83b in signal_emit_unlocked_R (node=node@entry=0x1603ee0, detail=detail@entry=0, instance=instance@entry=0x1996240,
    emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffc2d0) at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3483
        accumulator = 0x0
        emission = {
          next = 0x7fffffffc840,
          instance = 0x1996240,
          ihint = {
            signal_id = 10,
            detail = 0,
            run_type = G_SIGNAL_RUN_FIRST
          },
          state = EMISSION_RUN,
          chain_type = 23647328
        }
        handler_list = <optimized out>
        return_accu = 0x0
        accu = {
          g_type = 0,
          data = {{
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }, {
---Type <return> to continue, or q <return> to quit---
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }}
        }
        signal_id = 10
        max_sequential_handler_number = 11502
        return_value_altered = <optimized out>
#19 0x00007ffff5424778 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffc460)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3309
        instance_and_params = 0x7fffffffc2d0
        signal_return_type = <optimized out>
        param_values = 0x7fffffffc2e8
        i = <optimized out>
        n_params = <optimized out>
        __FUNCTION__ = "g_signal_emit_valist"
#20 0x00007ffff54249df in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3365
        var_args = {{
            gp_offset = 32,
            fp_offset = 48,
            overflow_arg_area = 0x7fffffffc540,
            reg_save_area = 0x7fffffffc480
          }}
#21 0x00007ffff6d67de7 in gtk_widget_size_allocate_with_baseline (widget=0x1996240, allocation=0x0, baseline=-1) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwidget.c:6075
        priv = 0x1996160
        real_allocation = {
          x = 0,
          y = 0,
          width = 443,
          height = 627
        }
        old_clip = {
          x = 0,
          y = 0,
          width = 452,
          height = 627
        }
        adjusted_allocation = {
          x = 0,
          y = 0,
          width = 443,
          height = 627
---Type <return> to continue, or q <return> to quit---
        }
        size_changed = 1
        baseline_changed = 0
        position_changed = 0
        natural_width = 533
        natural_height = 156
        dummy = -388717296
        min_width = 452
        min_height = 156
        __FUNCTION__ = "gtk_widget_size_allocate_with_baseline"
#22 0x00007ffff6d681aa in gtk_widget_size_allocate (widget=widget@entry=0x1996240, allocation=allocation@entry=0x7fffffffc690)
    at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwidget.c:6151
No locals.
#23 0x00007ffff6d78811 in gtk_window_move_resize (window=0x1996240) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwindow.c:9147
        allocation = {
          x = 0,
          y = 0,
          width = 443,
          height = 627
        }
        new_flags = 106
        current_width = 443
        priv = 0x1996010
        widget = 0x1996240
        info = 0x1b2a910
        new_geometry = {
          min_width = 452,
          min_height = 156,
          max_width = 0,
          max_height = 0,
          base_width = 38,
          base_height = 87,
          width_inc = 9,
          height_inc = 18,
          min_aspect = 0,
          max_aspect = 0,
          win_gravity = GDK_GRAVITY_NORTH_WEST
        }
        new_request = {
          x = 0,
          y = 0,
          width = 452,
          height = 627
        }
        configure_request_pos_changed = 0
        hints_changed = <optimized out>
        current_height = <optimized out>
        container = 0x1996240
        gdk_window = 0x1707240
---Type <return> to continue, or q <return> to quit---
        configure_request_size_changed = 0
        saved_last_info = {
          geometry = {
            min_width = 452,
            min_height = 156,
            max_width = 0,
            max_height = 0,
            base_width = 38,
            base_height = 87,
            width_inc = 9,
            height_inc = 18,
            min_aspect = <optimized out>,
            max_aspect = <optimized out>,
            win_gravity = <optimized out>
          },
          flags = <optimized out>,
          configure_request = {
            x = <optimized out>,
            y = <optimized out>,
            width = <optimized out>,
            height = <optimized out>
          }
        }
#24 gtk_window_check_resize (container=0x1996240) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkwindow.c:7916
No locals.
#25 0x00007ffff540a474 in _g_closure_invoke_va (closure=0x7ffff6db7edf, closure@entry=0x167b5c0, return_value=0x8, return_value@entry=0x0, instance=0x7ffff5185e25,
    instance@entry=0x1996240, args=0x7ffff6e121c0 <__FUNCTION__.35024>, args@entry=0x7fffffffc900, n_params=-153018873, param_types=0x1682470)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gclosure.c:831
        marshal = 0x0
        marshal_data = 0x7ffff6e11e07
        __FUNCTION__ = "_g_closure_invoke_va"
#26 0x00007ffff5424087 in g_signal_emit_valist (instance=0x1996240, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffc900)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3218
        return_accu = <optimized out>
        accu = {
          g_type = 0,
          data = {{
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }, {
              v_int = 0,
              v_uint = 0,
---Type <return> to continue, or q <return> to quit---
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }}
        }
        accumulator = 0x0
        emission = {
          next = 0x7fffffffcb20,
          instance = 0x1996240,
          ihint = {
            signal_id = 74,
            detail = 0,
            run_type = G_SIGNAL_RUN_LAST
          },
          state = EMISSION_RUN,
          chain_type = 23647328
        }
        signal_id = 74
        instance_type = <optimized out>
        emission_return = {
          g_type = 0,
          data = {{
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }, {
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }}
        }
        rtype = 4
        static_scope = 0
---Type <return> to continue, or q <return> to quit---
        fastpath_handler = <optimized out>
        closure = 0x167b5c0
        run_type = <optimized out>
        l = <optimized out>
        fastpath = <optimized out>
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __FUNCTION__ = "g_signal_emit_valist"
#27 0x00007ffff54249df in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3365
        var_args = {{
            gp_offset = 24,
            fp_offset = 48,
            overflow_arg_area = 0x7fffffffc9e0,
            reg_save_area = 0x7fffffffc920
          }}
#28 0x00007ffff6b821fc in gtk_container_idle_sizer (clock=0x170b250, container=0x1996240) at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkcontainer.c:1755
No locals.
#29 0x00007ffff540a474 in _g_closure_invoke_va (closure=0x7ffff6db7edf, closure@entry=0x1e53780, return_value=0x8, return_value@entry=0x0, instance=0x7ffff5185e25,
    instance@entry=0x170b250, args=0x7ffff6e121c0 <__FUNCTION__.35024>, args@entry=0x7fffffffcc48, n_params=-153018873, param_types=0x1682470)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gclosure.c:831
        marshal = 0x0
        marshal_data = 0x7ffff6e11e07
        __FUNCTION__ = "_g_closure_invoke_va"
#30 0x00007ffff5424087 in g_signal_emit_valist (instance=0x170b250, signal_id=<optimized out>, detail=0, var_args=0x7fffffffcc48)
    at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3218
        return_accu = <optimized out>
        accu = {
          g_type = 0,
          data = {{
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }, {
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
---Type <return> to continue, or q <return> to quit---
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }}
        }
        accumulator = 0x0
        emission = {
          next = 0x0,
          instance = 0x170b250,
          ihint = {
            signal_id = 140,
            detail = 0,
            run_type = G_SIGNAL_RUN_FIRST
          },
          state = EMISSION_RUN,
          chain_type = 24157520
        }
        signal_id = 140
        instance_type = <optimized out>
        emission_return = {
          g_type = 0,
          data = {{
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }, {
              v_int = 0,
              v_uint = 0,
              v_long = 0,
              v_ulong = 0,
              v_int64 = 0,
              v_uint64 = 0,
              v_float = 0,
              v_double = 0,
              v_pointer = 0x0
            }}
        }
        rtype = 4
        static_scope = 0
        fastpath_handler = <optimized out>
        closure = 0x1e53780
        run_type = <optimized out>
        l = <optimized out>
---Type <return> to continue, or q <return> to quit---
        fastpath = <optimized out>
        instance_and_params = <optimized out>
        signal_return_type = <optimized out>
        param_values = <optimized out>
        i = <optimized out>
        n_params = <optimized out>
        __FUNCTION__ = "g_signal_emit_valist"
#31 0x00007ffff5424f2a in g_signal_emit_by_name (instance=0x7ffff6db7edf, instance@entry=0x170b250, detailed_signal=0x8 <error: Cannot access memory at address 0x8>,
    detailed_signal@entry=0x7ffff681b736 "layout") at /tmp/buildd/glib2.0-2.42.1/./gobject/gsignal.c:3405
        var_args = {{
            gp_offset = 16,
            fp_offset = 48,
            overflow_arg_area = 0x7fffffffcd80,
            reg_save_area = 0x7fffffffcc90
          }}
        detail = 0
        signal_id = 140
        __FUNCTION__ = "g_signal_emit_by_name"
#32 0x00007ffff67b5974 in gdk_frame_clock_paint_idle (data=0x170b250) at /tmp/buildd/gtk+3.0-3.14.5/./gdk/gdkframeclockidle.c:408
        iter = 1
        clock = 0x170b250
        clock_idle = 0x170b250
        priv = 0x170b170
        skip_to_resume_events = 0
        timings = 0x1d9dcc0
#33 0x00007ffff67a7e78 in gdk_threads_dispatch (data=0x1860b40, data@entry=<error reading variable: value has been optimized out>)
    at /tmp/buildd/gtk+3.0-3.14.5/./gdk/gdk.c:654
        dispatch = 0x1860b40
        ret = 0
#34 0x00007ffff5135613 in g_timeout_dispatch (source=0x1e58820, callback=<optimized out>, user_data=<optimized out>) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:4520
        timeout_source = 0x1e58820
        again = <optimized out>
#35 0x00007ffff5134b6d in g_main_dispatch (context=0x16eacf0) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3111
        dispatch = 0x7ffff5135600 <g_timeout_dispatch>
        prev_source = 0x0
        was_in_call = 0
        user_data = 0x1860b40
        callback = 0x7ffff67a7e50 <gdk_threads_dispatch>
        cb_funcs = <optimized out>
        cb_data = 0x1c8fec0
        need_destroy = <optimized out>
        source = 0x1e58820
        current = 0x170f5c0
        i = 0
#36 g_main_context_dispatch (context=context@entry=0x16eacf0) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3710
No locals.
#37 0x00007ffff5134f48 in g_main_context_iterate (context=context@entry=0x16eacf0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3781
        max_priority = 120
---Type <return> to continue, or q <return> to quit---
        timeout = 0
        some_ready = 1
        nfds = <optimized out>
        allocated_nfds = 3
        fds = 0x17f6c30
#38 0x00007ffff5134ffc in g_main_context_iteration (context=0x16eacf0, context@entry=0x0, may_block=may_block@entry=1) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3842
        retval = <optimized out>
#39 0x00007ffff6c2dcc5 in gtk_main_iteration () at /tmp/buildd/gtk+3.0-3.14.5/./gtk/gtkmain.c:1308
No locals.
#40 0x0000000000545c63 in XTread_socket (terminal=0x12fdb80, hold_quit=0x7fffffffcf60) at xterm.c:8775
        count = 0
        event_found = false
        dpyinfo = 0x1912800
#41 0x0000000000592262 in gobble_input () at keyboard.c:6771
        nr = 0
        hold_quit = {
          kind = NO_EVENT,
          part = scroll_bar_nowhere,
          code = 0,
          modifiers = 0,
          x = 0,
          y = 0,
          timestamp = 0,
          frame_or_window = 0,
          arg = 0
        }
        next = 0x0
        nread = 0
        err = false
        t = 0x12fdb80
#42 0x00000000005927e7 in handle_async_input () at keyboard.c:7023
        nread = 0
#43 0x0000000000592806 in process_pending_signals () at keyboard.c:7037
No locals.
#44 0x0000000000604c49 in Fmake_list (length=0, init=0) at alloc.c:2705
        val = 31958179
        size = 0
#45 0x00000000006361fb in concat (nargs=1, args=0x7fffffffd1a8, target_type=Lisp_Cons, last_special=false) at fns.c:633
        val = 0
        tail = 0
        this = 22459043
        toindex = 0
        toindex_byte = 0
        result_len = 1
        result_len_byte = 1
        argnum = 1
        last_tail = 0
        prev = 0
        some_multibyte = false
---Type <return> to continue, or q <return> to quit---
        textprops = 0x0
        num_textprops = 0
        sa_avail = 16384
        sa_count = 3
        sa_must_free = false
#46 0x0000000000635b9a in Fcopy_sequence (arg=22459043) at fns.c:501
No locals.
#47 0x000000000058c928 in timer_check () at keyboard.c:4447
        nexttime = {
          tv_sec = 0,
          tv_nsec = 0
        }
        timers = 0
        idle_timers = 0
        tem = 0
#48 0x000000000058a0f6 in readable_events (flags=1) at keyboard.c:3304
No locals.
#49 0x00000000005920ac in get_input_pending (flags=1) at keyboard.c:6686
No locals.
#50 0x0000000000599894 in detect_input_pending_run_timers (do_display=true) at keyboard.c:9817
        old_timers_run = 6
#51 0x000000000068a0db in wait_reading_process_output (time_limit=0, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=0, wait_proc=0x0, just_wait_proc=0)
    at process.c:4963
        old_timers_run = 6
        old_buffer = 0xde1100
        old_window = 20934853
        leave = false
        process_skipped = false
        channel = 0
        nfds = 1
        Available = {
          fds_bits = {512, 0 <repeats 15 times>}
        }
        Writeok = {
          fds_bits = {0 <repeats 16 times>}
        }
        check_write = true
        check_delay = 0
        no_avail = false
        xerrno = 11
        proc = 140737488344704
        timeout = {
          tv_sec = 0,
          tv_nsec = 0
        }
        end_time = {
          tv_sec = 51926,
          tv_nsec = 526406277
        }
---Type <return> to continue, or q <return> to quit---
        timer_delay = {
          tv_sec = 0,
          tv_nsec = 242146435
        }
        got_output_end_time = {
          tv_sec = 1448483268,
          tv_nsec = 894015374
        }
        wait = INFINITY
        got_some_output = -1
        count = 2
        now = {
          tv_sec = 0,
          tv_nsec = -1
        }
#52 0x000000000058b16c in kbd_buffer_get_event (kbp=0x7fffffffd818, used_mouse_menu=0x7fffffffddff, end_time=0x0) at keyboard.c:3795
        do_display = true
        obj = 893985407
#53 0x0000000000586701 in read_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fffffffdbc0, used_mouse_menu=0x7fffffffddff) at keyboard.c:2121
        c = 0
        save_jump = {{
            __jmpbuf = {0, 0, 0, 0, 0, 0, 0, 0},
            __mask_was_saved = 0,
            __saved_mask = {
              __val = {0 <repeats 16 times>}
            }
          }}
        kb = 0x0
#54 0x00000000005869d0 in read_decoded_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fffffffdbc0, prev_event=0, used_mouse_menu=0x7fffffffddff)
    at keyboard.c:2184
        nextevt = 14249584
        frame = 0x7fffffffda70
        terminal = 0x0
        events = {140737488345584, 14249584, 0, 0, 140737488345584, 5742676, 0, 31935987, 140737488345648, 5808618, 935, 4294967296, 0, 5742676, 20934848, 0}
        n = 0
#55 0x000000000058863c in read_char (commandflag=1, map=30806627, prev_event=0, used_mouse_menu=0x7fffffffddff, end_time=0x0) at keyboard.c:2779
        c = 0
        jmpcount = 2
        local_getcjmp = {{
            __jmpbuf = {0, -308247075226988984, 21848269, 44304, 0, 0, -308247075057119672, 308247691226828360},
            __mask_was_saved = 0,
            __saved_mask = {
              __val = {14249584, 140737488346176, 0, 140737488346176, 5742676, 18912080, 14249584, 140737488346320, 0, 140737488346224, 5742676, 0, 19261859,
                140737488346320, 6497538, 0}
            }
          }}
        save_jump = {{
            __jmpbuf = {0, 0, 0, 25769803776, 14553344, 140737488345928, 5749423, 25769803776},
            __mask_was_saved = 14553349,
---Type <return> to continue, or q <return> to quit---
            __saved_mask = {
              __val = {140737488345960, 14553344, 140737488345952, 5749640, 25784357125, 14553344, 140737488346008, 5749423, 25769833104, 14553349, 6966294, 14553344,
                140737488346032, 5749640, 14553349, 140737488346064}
            }
          }}
        tem = 535296
        save = 0
        previous_echo_area_message = 0
        also_record = 0
        reread = false
        recorded = false
        polling_stopped_here = true
        orig_kboard = 0x171ac90
#56 0x0000000000597c93 in read_key_sequence (keybuf=0x7fffffffdfb0, bufsize=30, prompt=0, dont_downcase_last=false, can_return_switch_frame=true,
    fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9018
        interrupted_kboard = 0x171ac90
        interrupted_frame = 0x13f60b0
        key = 25774401020
        used_mouse_menu = false
        echo_local_start = 0
        last_real_key_start = 0
        keys_local_start = 0
        new_binding = 5749423
        count = 2
        t = 0
        echo_start = 0
        keys_start = 0
        current_binding = 30806627
        first_event = 0
        first_unbound = 31
        mock_input = 0
        fkey = {
          parent = 18643683,
          map = 18643683,
          start = 0,
          end = 0
        }
        keytran = {
          parent = 14507587,
          map = 14507587,
          start = 0,
          end = 0
        }
        indec = {
          parent = 18644019,
          map = 18644019,
          start = 0,
          end = 0
        }
---Type <return> to continue, or q <return> to quit---
        shift_translated = false
        delayed_switch_frame = 0
        original_uppercase = 5749423
        original_uppercase_position = -1
        dummyflag = false
        starting_buffer = 0xde1100
        fake_prefixed_keys = 0
#57 0x00000000005846af in command_loop_1 () at keyboard.c:1343
        cmd = 18912
        keybuf = {7068, 28272, 140737488347120, 6356275, 14086960, 0, 5749288, 0, 140737488347216, 6359201, 0, 28272, 0, 14249584, 14086960, 0, 140737488347216,
          5742676, 140737488347248, 0, 140737488347312, 6497538, 14700803, 14249584, 140737488347312, 0, 140737488347296, 5742676, 14277856, 0}
        i = 0
        prev_modiff = 0
        prev_buffer = 0x0
        already_adjusted = false
#58 0x000000000062d0e3 in internal_condition_case (bfun=0x58426d <command_loop_1>, handlers=18912, hfun=0x5838db <cmd_error>) at eval.c:1309
        val = 14700803
        c = 0x165cc10
#59 0x0000000000583e9b in command_loop_2 (ignore=0) at keyboard.c:1086
        val = 0
#60 0x000000000062c68d in internal_catch (tag=45696, func=0x583e72 <command_loop_2>, arg=0) at eval.c:1074
        val = 0
        c = 0x165cae0
#61 0x0000000000583e3b in command_loop () at keyboard.c:1065
No locals.
#62 0x00000000005833ba in recursive_edit_1 () at keyboard.c:671
        count = 1
        val = 140737488347696
#63 0x00000000005835c5 in Frecursive_edit () at keyboard.c:742
        count = 0
        buffer = 0
#64 0x00000000005813d8 in main (argc=2, argv=0x7fffffffe438) at emacs.c:1656
        dummy = 140737488347872
        stack_bottom_variable = 0 '\000'
        do_initial_setlocale = true
        dumping = false
        skip_args = 0
        rlim = {
          rlim_cur = 8720000,
          rlim_max = 18446744073709551615
        }
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x0
        original_pwd = 0x0
Reply | Threaded
Open this post in threaded view
|

bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion

martin rudalics
 > Yes. But at least I know now what really triggers this problem: GTK
 > throws this assertion when the menubar is not completely visible. This
 > is also why running Dired triggers this, because it adds a bunch of
 > additional menu entries. The frame is then resized so that the menu-bar
 > fits.

Magnificent!  Easy to trigger here by continuously narrowing the frame
until a menubar item disappears.  And starting dired from a fairly
narrow frame with the menubar fully visible resizes the frame so that
all menubar items are visible.  Thanks for finding the cause of this.

And obviously this is Bug#15700 ;-)

I don't think we can/should do anything about this.  But at least we
have to document it somewhere.  Any ideas?

martin



Reply | Threaded
Open this post in threaded view
|

bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion

David Engster
martin rudalics writes:

>> Yes. But at least I know now what really triggers this problem: GTK
>> throws this assertion when the menubar is not completely visible. This
>> is also why running Dired triggers this, because it adds a bunch of
>> additional menu entries. The frame is then resized so that the menu-bar
>> fits.
>
> Magnificent!  Easy to trigger here by continuously narrowing the frame
> until a menubar item disappears.  And starting dired from a fairly
> narrow frame with the menubar fully visible resizes the frame so that
> all menubar items are visible.  Thanks for finding the cause of this.
>
> And obviously this is Bug#15700 ;-)

I really need to improve my search-fu...

> I don't think we can/should do anything about this.

Not sure about the "can", but I think we definitely should. The
dired-thing is already pretty annoying for people like my co-worker who
are very adamant about having an Emacs frame that is *exactly* 80
characters wide. He has to resize the frame every time he leaves Dired.

Also, after some more testing, it seems pretty clear that the frame size
is battled out between GTK and Emacs when you make the width smaller
than the menu-bar. If you resize with the mouse, it depends on the
window manager what exactly happens, but I've seen two things:

- with 'wmii', the window simply snaps back to the width that's needed
  by the menu bar

- with 'i3', I can resize to a smaller width with the mouse, but during
  the resize I see flickering to the menu-bar width

Also, it seems to be impossible to programatically set a frame width
that is smaller than the menu-bar. `set-frame-width' doesn't work,
neither does `initial-frame-alist' or even the '-geometry' switch.

Unfortunately, I'm not very familiar with GTK. My guess is that you
would somehow have to catch the 'size-allocate' signal and do The Right
Thing in the callback, but my hacks so far were not successful.

> But at least we have to document it somewhere.  Any ideas?

For starters, I think this should be documented in the Emacs manual
about frame parameters and in functions/variables like `set-frame-width'
and `initial-frame-alist'.

-David



Reply | Threaded
Open this post in threaded view
|

bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion

martin rudalics
 >> And obviously this is Bug#15700 ;-)
 >
 > I really need to improve my search-fu...

I could have noticed sooner too.  Google also lists:

https://bugzilla.redhat.com/show_bug.cgi?id=881760

https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00276.html

https://bbs.archlinux.org/viewtopic.php?id=168847

https://cygwin.com/ml/cygwin/2013-07/msg00070.html

 >> I don't think we can/should do anything about this.
 >
 > Not sure about the "can", but I think we definitely should. The
 > dired-thing is already pretty annoying for people like my co-worker who
 > are very adamant about having an Emacs frame that is *exactly* 80
 > characters wide. He has to resize the frame every time he leaves Dired.
 >
 > Also, after some more testing, it seems pretty clear that the frame size
 > is battled out between GTK and Emacs when you make the width smaller
 > than the menu-bar. If you resize with the mouse, it depends on the
 > window manager what exactly happens, but I've seen two things:
 >
 > - with 'wmii', the window simply snaps back to the width that's needed
 >    by the menu bar
 >
 > - with 'i3', I can resize to a smaller width with the mouse, but during
 >    the resize I see flickering to the menu-bar width
 >
 > Also, it seems to be impossible to programatically set a frame width
 > that is smaller than the menu-bar. `set-frame-width' doesn't work,
 > neither does `initial-frame-alist' or even the '-geometry' switch.

Here with xfce ‘set-frame-width’ and ‘default-frame-alist’ both crop the
menubar.

 > Unfortunately, I'm not very familiar with GTK. My guess is that you
 > would somehow have to catch the 'size-allocate' signal and do The Right
 > Thing in the callback, but my hacks so far were not successful.

If I'm not mistaken the problem should happen in one of the two
gtk_distribute_natural_allocation calls of gtk_menu_bar_size_allocate.

But create_menus in gtkutil.c has this

           /* Set width of menu bar to a small value so it doesn't enlarge
              a small initial frame size.  The width will be set to the
              width of the frame later on when it is added to a container.
              height -1: Natural height.  */
           gtk_widget_set_size_request (wmenu, 1, -1);

I have no idea yet how these are related and when the "width will be set".

 > For starters, I think this should be documented in the Emacs manual
 > about frame parameters and in functions/variables like `set-frame-width'
 > and `initial-frame-alist'.

Could people test this with their favorite window managers?

martin




Reply | Threaded
Open this post in threaded view
|

bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion

David Engster
martin rudalics writes:

>>> And obviously this is Bug#15700 ;-)
>>
>> I really need to improve my search-fu...
>
> I could have noticed sooner too.  Google also lists:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=881760
>
> https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00276.html
>
> https://bbs.archlinux.org/viewtopic.php?id=168847
>
> https://cygwin.com/ml/cygwin/2013-07/msg00070.html

I've actually found most of those, as well as bug #12234, but I think
that one was a problem only with Unity.

>> Also, it seems to be impossible to programatically set a frame width
>> that is smaller than the menu-bar. `set-frame-width' doesn't work,
>> neither does `initial-frame-alist' or even the '-geometry' switch.
>
> Here with xfce ‘set-frame-width’ and ‘default-frame-alist’ both crop the
> menubar.

That's weird. I just tested with 'icewm' and saw the same behavior as in
'i3' (flickering during resize and (set-frame-width nil 10) not
working). Maybe it also depends on the exact GTK3 version?

>> Unfortunately, I'm not very familiar with GTK. My guess is that you
>> would somehow have to catch the 'size-allocate' signal and do The Right
>> Thing in the callback, but my hacks so far were not successful.
>
> If I'm not mistaken the problem should happen in one of the two
> gtk_distribute_natural_allocation calls of gtk_menu_bar_size_allocate.
>
> But create_menus in gtkutil.c has this
>
>           /* Set width of menu bar to a small value so it doesn't enlarge
>              a small initial frame size.  The width will be set to the
>              width of the frame later on when it is added to a container.
>              height -1: Natural height.  */
>           gtk_widget_set_size_request (wmenu, 1, -1);
>
> I have no idea yet how these are related and when the "width will be set".

I think the final width is set when container containing the menu widget
is actually displayed. The code is pretty opaque to me - I guess we
can't just use a plain gtk menu_bar because we need to add/remove menu
items at runtime? Because any other GTK3 app I've tried did not have any
problem with cropping the menu bar during resize.

-David



Reply | Threaded
Open this post in threaded view
|

bug#22000: 25.0.50; Running dired changes frame width, gtk_distribute_natural_allocation throws assertion

martin rudalics
 >> Here with xfce ‘set-frame-width’ and ‘default-frame-alist’ both crop the
 >> menubar.
 >
 > That's weird. I just tested with 'icewm' and saw the same behavior as in
 > 'i3' (flickering during resize and (set-frame-width nil 10) not
 > working). Maybe it also depends on the exact GTK3 version?

Mine is 3.4.2.

 > I think the final width is set when container containing the menu widget
 > is actually displayed. The code is pretty opaque to me - I guess we
 > can't just use a plain gtk menu_bar because we need to add/remove menu
 > items at runtime? Because any other GTK3 app I've tried did not have any
 > problem with cropping the menu bar during resize.

At least that's the only reason I can think of why this problem seems to
predominantly hit Emacs.

martin




Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

Vivek Dasmohapatra-2
In reply to this post by David Engster
Tags: patch

This patch attempts to address the menu-bar interaction with the
frame size: I've been using it locally for a short while now.

It does make the menu bar taller than it was - This may be
addressable by using overlay scrollbars but there is currently
a bad focus interaction with those so the patch suppresses them
(overlay scrollbars) for now.

0001-GTK3-menu-bars-force-frame-resizing-Bug-22000.patch (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

martin rudalics
 > This patch attempts to address the menu-bar interaction with the
 > frame size: I've been using it locally for a short while now.

Thanks.  'gtk_widget_set_focus_on_click' is only available since GTK
3.20 and 'gtk_scrolled_window_set_overlay_scrolling' since 3.16 so
please condition your patch accordingly in order to allow compilation
with older versions (like mine).

Making the menu bar a "scrolled window" appears like a rather gross
hack to me and I think we should use it only as a last resort.  Can
you tell what actually is different for a scrolled window in order to
not trigger auto-resizing of its parent?

I wonder why 'gtk_widget_set_size_request' does not handle this
problem in the first place.  In 'create_menus' we do

           wmenu = gtk_menu_bar_new ();
           /* Set width of menu bar to a small value so it doesn't enlarge
              a small initial frame size.  The width will be set to the
              width of the frame later on when it is added to a container.
              height -1: Natural height.  */
           gtk_widget_set_size_request (wmenu, 1, -1);

Is it possible that this gets reset later and/or another such call is
needed when adding a new menu bar item?  After all, you can set a
small initial width of a frame via 'default-frame-alist' so that the
menu bar is initially partially hidden/truncated.  Right?  So in
principle truncating should work but somehow breaks when we add items
to the menu bar.

Note that I can't really experiment with this because I don't get any
resizing here.

 > It does make the menu bar taller than it was - This may be
 > addressable by using overlay scrollbars but there is currently
 > a bad focus interaction with those so the patch suppresses them
 > (overlay scrollbars) for now.

How much taller does the menu bar get?  By the possible height of a
horizontal scroll bar?

Thank you for working on this problem, martin



Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

Vivek Dasmohapatra-2
On Mon, 16 Jul 2018, martin rudalics wrote:

> Making the menu bar a "scrolled window" appears like a rather gross
> hack to me and I think we should use it only as a last resort.  Can
> you tell what actually is different for a scrolled window in order to
> not trigger auto-resizing of its parent?

Literally what the scrolled window is for, from what I can tell: Make
a widget that otherwise makes hard demands of its parent for space
allocation into a scrollable one.

> I wonder why 'gtk_widget_set_size_request' does not handle this
> problem in the first place.  In 'create_menus' we do

> Is it possible that this gets reset later and/or another such call is
> needed when adding a new menu bar item?  After all, you can set a

Yes, I've been digging through the code a bit and it looks like the
menu bar recalculates everything when its contents change. In addition
there's an idle callback which occasionally asks the menu bar what it
thinks its size is.

I was hoping to be able to figure out if this was controllable from
user code by comparing with the tool bar, which does not seem to
display this symptom, but no luck so far.

>> It does make the menu bar taller than it was - This may be
>> addressable by using overlay scrollbars but there is currently
>> a bad focus interaction with those so the patch suppresses them
>> (overlay scrollbars) for now.
>
> How much taller does the menu bar get?  By the possible height of a
> horizontal scroll bar?

If you have overlay scrolling, no taller: If you don't, the height
of a scrollbar plus whatever spacing is defined for the scrollable
window by your gtk style (default: 3px).

> Thank you for working on this problem, martin

No problem, it's been annoying me for a few years now.



Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

Vivek Dasmohapatra-2
I have #ifdef'd the calls you mentioned with GTK_CHECK_VERSION guards.

I also checked with one of the gnome/gtk devs and wrapping a
widget with strict ideas about its size is how you are supposed
to prevent its size from propagating: I suppose an alternative
would be some widget that doesn't resize or scroll at all,
but the basic approach would be the same.

I could not find a way to make overlay scrolbars behave, I think it's
probably a bug in overlay scrollbars since classic scrollbars behave
just fine: I don't think that will be a problem as 3.16 is when overlay
scrolling was introduced and that was also when the disabling function
was provided.



0001-GTK3-menu-bars-force-frame-resizing-Bug-22000.patch (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

martin rudalics
 > I have #ifdef'd the calls you mentioned with GTK_CHECK_VERSION guards.

Thank you.  It builds here now with GTK 3.4.2 and seems to have the
intended effect.

 > I also checked with one of the gnome/gtk devs and wrapping a
 > widget with strict ideas about its size is how you are supposed
 > to prevent its size from propagating:

I suppose the menu bar is a widget we never want to resize with GTK
and we want to get clipped pixelwise which means that the last
(rightmost here) entry may be partially visible but opens on a mouse
click and shows its submenus.  This contrasts with the tool bar where
we want a rightmost item either fit or be omitted, that is, never be
shown partially.

The major problem with your patch is that it completely breaks the
initial frame geometry at least here: The nominal (outer) height of
the initial frame (with emacs -Q) goes down from 749 to 731 pixels.
The height of the initial window goes down from 35 lines (630 pixels)
to 33 lines (595 pixels).

The height of the menu bar (calculated from the remaining components
because 'frame-geometry' sees no difference) seems to go up from 27 to
34 or 44 pixels which means an increase of 7 or 17 pixels.  I leave it
to your imagination what kind of uproar such behavior might provoke in
this our community.

So unless mine is very isolated, at the very least we would have to
make the behavior optional in order to address the concerns of all
users wrt implicit menu bar resizing and the size occupied by the menu
bar.  And we would have to fix the frame geometry calculations.

 > I suppose an alternative
 > would be some widget that doesn't resize or scroll at all,
 > but the basic approach would be the same.

There should be some.  I have no idea who is responsible for the tool
bar behavior but IIUC that should be the way to go for the menu bar
(with different clipping behavior, I suppose).

Could people who reported a similar behavior (see bugs 15700, 22898,
31626) test Vivek's patch?  I'm not sure whether they get this message
automatically, debbugs merging has always escaped my comprehension.
David, are you listening?

martin



Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

Vivek Dasmohapatra-2
> The major problem with your patch is that it completely breaks the
> initial frame geometry at least here: The nominal (outer) height of
> the initial frame (with emacs -Q) goes down from 749 to 731 pixels.
> The height of the initial window goes down from 35 lines (630 pixels)
> to 33 lines (595 pixels).

Working on it - should be a case of using the container instead of the
menu bar for calculations.

> There should be some.  I have no idea who is responsible for the tool
> bar behavior but IIUC that should be the way to go for the menu bar
> (with different clipping behavior, I suppose).

I could be wrong but it seems to be an intrinsic difference between the
toolbar and the menubar. I'll see if I can figure it out.




Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

Vivek Dasmohapatra-2
>> The height of the initial window goes down from 35 lines (630 pixels)
>> to 33 lines (595 pixels).

This patch (added on top of the previous one) should fix the frame
size calculation.

Still looking into whether there's a purely truncating solution.

0002-GTK3-correct-frame-height-calculation-with-scrollabl.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

martin rudalics
 > This patch (added on top of the previous one) should fix the frame size calculation.

Thanks.  The calculations are OK now.  It confirms my earlier claim
that here the menu bar size increases from 27 to 44 pixels so it
becomes exactly as high as the tool bar.

 > Still looking into whether there's a purely truncating solution.

I think your idea of using a container window is the way to go.  Now
suppose we used a non-scrolled container window to put the menu bar
in, get its size before updating the menu bar, update the menu bar and
make a gtk_widget_set_size request for that container window to
restore its previous size.  Would that fail and why?

martin



Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

martin rudalics
 > I think your idea of using a container window is the way to go.  Now
 > suppose we used a non-scrolled container window to put the menu bar
 > in, get its size before updating the menu bar, update the menu bar and
 > make a gtk_widget_set_size request for that container window to

Probably this must be gdk_window_move_resize or else we would have to
set the policy of the container window to allow shrinking.

 > restore its previous size.  Would that fail and why?

martin



Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

Vivek Dasmohapatra-2
In reply to this post by martin rudalics
> suppose we used a non-scrolled container window to put the menu bar
> in, get its size before updating the menu bar, update the menu bar and
> make a gtk_widget_set_size request for that container window to
> restore its previous size.  Would that fail and why?

Depends on the behaviour of the container. The menu bar gets poked
to emit its size from time to time by an internal gtk callback
so if the container respects its wishes it will pop back to the larger
size semi-predictably (this behaviour can occasionally be seen in
the currently released emacs as that's how the hbox behaves).

So we'd need a container that didn't grant such space requests.
gtk fixed is close, but from its documentation has other
limitations we don't want (no RTL support).

You can turn scrollbars off in a scrolled window but unfortunately
this results in the scrolled window responding to size allocation
requests from its child.




Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

martin rudalics
 >> suppose we used a non-scrolled container window to put the menu bar
 >> in, get its size before updating the menu bar, update the menu bar and
 >> make a gtk_widget_set_size request for that container window to
 >> restore its previous size.  Would that fail and why?
 >
 > Depends on the behaviour of the container. The menu bar gets poked
 > to emit its size from time to time by an internal gtk callback

Can you point me to where gtk does that?

 > so if the container respects its wishes it will pop back to the larger
 > size semi-predictably (this behaviour can occasionally be seen in
 > the currently released emacs as that's how the hbox behaves).

I suppose the container respecting its wishes is that of the Emacs
frame's window.  And if that container were a scrolled window, it
would not auto-resize.  Do I reason correctly?

 > So we'd need a container that didn't grant such space requests.
 > gtk fixed is close, but from its documentation has other
 > limitations we don't want (no RTL support).

I'm probably too silly to understand the semantics of containers: The
menu bar widget's size is not fixed so its RTL behavior (and the
font/translation issues gtkfixed talks about) would not be affected.
Only the "virtual" container we'd add would have fixed size but this
does not mean that it passes on the fixed size property to the menu
bar's widget.  Inherently, this means that we would be cheating GTK
another time.  Or am I wrong?

 > You can turn scrollbars off in a scrolled window but unfortunately
 > this results in the scrolled window responding to size allocation
 > requests from its child.

This is incoherent, at least.  Could we suppress horizontal scroll
bars separately in a scrolled window (because I think that these are
responsible for the height increase of the menu bar)?

martin



Reply | Threaded
Open this post in threaded view
|

bug#22000: Patch addressing the menu-bar frame-resize interaction

Vivek Dasmohapatra-2
> Can you point me to where gtk does that?

Backtrace (attached):

   gdk_frame_clock_paint_idle
   …
   → gtk_container_idle_sizer
   …
   → gtk_distribute_natural_allocation

Is the path, I think.

> I suppose the container respecting its wishes is that of the Emacs
> frame's window.  And if that container were a scrolled window, it
> would not auto-resize.  Do I reason correctly?

Initially it's the box (vbox?) that the menubar is added to.
Not sure that's the top level widget.

> I'm probably too silly to understand the semantics of containers: The
> menu bar widget's size is not fixed so its RTL behavior (and the
> font/translation issues gtkfixed talks about) would not be affected.

I'm not overly familiar with GTK myself - I'm just going by the docs
for gtk fixed. You may be correct: I'm not going to speculate further
or try to understand the underlying code, I'm just going to try it :)

> Only the "virtual" container we'd add would have fixed size but this
> does not mean that it passes on the fixed size property to the menu
> bar's widget.  Inherently, this means that we would be cheating GTK
> another time.  Or am I wrong?

IIUC you are right - that's how you're supposed to do it - I just don't
know if there's a non-deprecated widget that does what we want.

Worst case scenario: If I grab the scrolled window class and mutilate it
till it does what we want, would you consider emacs carrying that widget
class in its code? It shouldn't change any of the build dependencies.

NOTE: FWIW even the hbox and vbox we are using are deprecated and have
been for a while, so this whole area of code is going to need to be
converted over to gtk grid at some point anyway.

>> You can turn scrollbars off in a scrolled window but unfortunately
>
> This is incoherent, at least.  Could we suppress horizontal scroll
> bars separately in a scrolled window (because I think that these are
> responsible for the height increase of the menu bar)?

You can suppress the scrollbars independently, but that's what restores
the unwanted resizing behaviour in that direction: Suppress the vertical
scrollbar and suddenly vertical size requests are honoured, suppress
the horizontal and suddenly the menu bar can force the frame size again.

gdb.txt (86K) Download Attachment
12345