lanoxx / tilda

A Gtk based drop down terminal for Linux and Unix
GNU General Public License v2.0
1.27k stars 162 forks source link

Add a D-Bus implementation for tilda #407

Closed lanoxx closed 3 years ago

lanoxx commented 4 years ago

For more details about this pull request see Add a D-Bus implementation for Tilda (draft).

amo13 commented 4 years ago

Compiles just fine :) In my GNOME keybinding settings I bind F1 to dbus-send --session --print-reply --dest=com.github.lanoxx.tilda.Actions0 /com/github/lanoxx/tilda/Actions0 com.github.lanoxx.tilda.Actions.Toggle and I use a systemd service to launch tilda at startup:

[Unit]
Description=Tilda drop-down terminal

[Service]
ExecStart=tilda --dbus

[Install]
WantedBy=default.target

Thank you!

amo13 commented 4 years ago

Although I noticed that trying to close a tab in tilda with ctrl+shift+w somehow breaks stuff in tilda. Afterwards, when I open tilda with F1, it does not get focus and pressing F1 again does not close it, only if I click onto tilda first. Right-clicking on tilda does not work anymore then and restarting the systemd unit somehow takes ages. There is no error message in the journal though...

lanoxx commented 4 years ago

Try to build tilda with --enable-maintainer-flags. That should give you some more output what tilda is doing. Maybe you can determine what exactly triggers the issue.

lanoxx commented 4 years ago

We probably also want to merge #120, and also make the pull down key optional (when D-Bus is enabled). So will ensure that it can be reused to register an external hotkey that invokes the D-Bus function.

amo13 commented 4 years ago

Although I noticed that trying to close a tab in tilda with ctrl+shift+w somehow breaks stuff in tilda. Afterwards, when I open tilda with F1, it does not get focus and pressing F1 again does not close it, only if I click onto tilda first. Right-clicking on tilda does not work anymore then and restarting the systemd unit somehow takes ages.

I recompiled with the maintainer-flag from above. This is the log for the session after repeating the steps above: Pull down terminal with F1, create new tab with Ctrl+Shift+T, close tab with Ctrl+Shift+W.

Apr 05 09:26:45 bodet-pc systemd[1608]: Started Tilda drop-down terminal.
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda.c: FUNCTION ENTERED: main: Using libvte version: 0.60.1
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda.c: FUNCTION ENTERED: remove_stale_lock_files
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda.c: FUNCTION ENTERED: islockfile
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda.c: FUNCTION ENTERED: create_lock_file
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda.c: FUNCTION ENTERED: get_instance_number
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda.c: FUNCTION ENTERED: islockfile
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda.c: FUNCTION ENTERED: create_lock_file
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda-cli-options.c: FUNCTION ENTERED: parse_cli
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda.c: FUNCTION ENTERED: get_config_file_name
Apr 05 09:26:45 bodet-pc tilda[7178]: configsys.c: FUNCTION ENTERED: config_init
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: tilda_window_init
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: tilda_window_set_fullscreen
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: tilda_window_add_tab
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_term_init
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_term_config_defaults
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_term_adjust_font_scale
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_term_set_scrollbar_position
Apr 05 09:26:45 bodet-pc tilda[7178]: void vte_terminal_match_set_cursor_type(VteTerminal*, int, GdkCursorType): assertion 'tag >= 0' failed
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: start_shell
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_switch_page_cb
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:26:45 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: generate_animation_positions
Apr 05 09:26:45 bodet-pc tilda[7178]: Virtual modifier for 'caps_lock_mask' set to: GDK_LOCK_MASK
Apr 05 09:26:45 bodet-pc tilda[7178]: Virtual modifier for 'num_lock_mask' set to: GDK_MOD2_MASK
Apr 05 09:26:45 bodet-pc tilda[7178]: Activating D-Bus interface on bus name: com.github.lanoxx.tilda.Actions0
Apr 05 09:26:45 bodet-pc tilda[7178]: Tilda has started. Press <Shift><Alt>t to pull down the window.
Apr 05 09:26:45 bodet-pc tilda[7178]: Virtual modifier for 'scroll_lock_mask' set to: 
Apr 05 09:26:45 bodet-pc tilda[7178]: Resolved accelerator: <Shift><Alt>t. KeySymbol: 116, Virtual Modifiers: GDK_SHIFT_MASK | GDK_MOD1_MASK
Apr 05 09:26:45 bodet-pc tilda[7178]: Binding to keycode 28
Apr 05 09:26:45 bodet-pc tilda[7178]: Binding to real modifier mask 9 (GDK_SHIFT_MASK | GDK_MOD1_MASK)
Apr 05 09:26:45 bodet-pc tilda[7178]: Added binding. Keystring: <Shift><Alt>t
Apr 05 09:26:45 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: shell_spawned_cb
Apr 05 09:26:45 bodet-pc tilda[7178]: TildaDbusActions: Name acquired: com.github.lanoxx.tilda.Actions0
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: window_title_changed_cb
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:26:45 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:27:06 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:06 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: focus_term
Apr 05 09:27:06 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: tilda_window_set_active
Apr 05 09:27:06 bodet-pc tilda[7178]: pull_down(): MOVED DOWN
Apr 05 09:27:07 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:07 bodet-pc tilda[7178]: pull_up(): MOVED UP
Apr 05 09:27:07 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: focus_out_event_cb
Apr 05 09:27:07 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: start_auto_hide_tick
Apr 05 09:27:07 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:31 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:31 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: focus_term
Apr 05 09:27:31 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: tilda_window_set_active
Apr 05 09:27:31 bodet-pc tilda[7178]: pull_down(): MOVED DOWN
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: tilda_window_add_tab
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_term_init
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_term_config_defaults
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_term_adjust_font_scale
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_term_set_scrollbar_position
Apr 05 09:27:34 bodet-pc tilda[7178]: void vte_terminal_match_set_cursor_type(VteTerminal*, int, GdkCursorType): assertion 'tag >= 0' failed
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: start_shell
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_switch_page_cb
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_switch_page_cb
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: shell_spawned_cb
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: window_title_changed_cb
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:27:34 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: tilda_terminal_get_title
Apr 05 09:27:36 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: mouse_enter
Apr 05 09:27:37 bodet-pc tilda[7178]: tilda_terminal.c: FUNCTION ENTERED: button_press_cb
Apr 05 09:27:39 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: close_current_tab
Apr 05 09:27:39 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: mouse_leave
Apr 05 09:27:39 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: focus_out_event_cb
Apr 05 09:27:39 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: start_auto_hide_tick
Apr 05 09:27:39 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:39 bodet-pc tilda[7178]: pull_up(): MOVED UP
Apr 05 09:27:40 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:40 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: focus_term
Apr 05 09:27:40 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: tilda_window_set_active
Apr 05 09:27:40 bodet-pc tilda[7178]: pull_down(): MOVED DOWN
Apr 05 09:27:44 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:44 bodet-pc tilda[7178]: pull_up(): MOVED UP
Apr 05 09:27:44 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: focus_out_event_cb
Apr 05 09:27:44 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: start_auto_hide_tick
Apr 05 09:27:44 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:44 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:44 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: focus_term
Apr 05 09:27:44 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: tilda_window_set_active
Apr 05 09:27:44 bodet-pc tilda[7178]: pull_down(): MOVED DOWN
Apr 05 09:27:44 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:44 bodet-pc tilda[7178]: Tilda window not focused but visible
Apr 05 09:27:44 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: tilda_window_set_active
Apr 05 09:27:45 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:45 bodet-pc tilda[7178]: Tilda window not focused but visible
Apr 05 09:27:45 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: tilda_window_set_active
Apr 05 09:27:45 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:45 bodet-pc tilda[7178]: Tilda window not focused but visible
Apr 05 09:27:45 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: tilda_window_set_active
Apr 05 09:27:45 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:45 bodet-pc tilda[7178]: Tilda window not focused but visible
Apr 05 09:27:45 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: tilda_window_set_active
Apr 05 09:27:46 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:46 bodet-pc tilda[7178]: Tilda window not focused but visible
Apr 05 09:27:46 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: tilda_window_set_active
Apr 05 09:27:48 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull
Apr 05 09:27:48 bodet-pc tilda[7178]: pull_up(): MOVED UP
Apr 05 09:27:48 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: focus_out_event_cb
Apr 05 09:27:48 bodet-pc tilda[7178]: tilda_window.c: FUNCTION ENTERED: start_auto_hide_tick
Apr 05 09:27:48 bodet-pc tilda[7178]: key_grabber.c: FUNCTION ENTERED: pull

Now, pulling down does not autofocus tilda. Hitting F1 without focus on tilda does not pull it back up. Right-click on tilda does nothing. And I can't close the second tab or switch tabs.

amo13 commented 4 years ago

Restarting tilda takes a long time after that, it looks like it's running into a timeout for something:

Apr 05 09:32:16 bodet-pc systemd[1608]: Stopping Tilda drop-down terminal...
Apr 05 09:33:46 bodet-pc systemd[1608]: tilda.service: State 'stop-sigterm' timed out. Killing.
Apr 05 09:33:46 bodet-pc systemd[1608]: tilda.service: Killing process 7178 (tilda) with signal SIGKILL.
Apr 05 09:33:46 bodet-pc systemd[1608]: tilda.service: Main process exited, code=killed, status=9/KILL
Apr 05 09:33:46 bodet-pc systemd[1608]: tilda.service: Failed with result 'timeout'.
Apr 05 09:33:46 bodet-pc systemd[1608]: Stopped Tilda drop-down terminal.
lanoxx commented 4 years ago

How much CPU does tilda consume when this happens? Could it be in an endless loop? If you are familia with gdb you could try to attach gdb when this happens to see what tilda is doing.

Btw. I am not familiar with systemd starting session services. How exactly did you setup tilda as systemd services?

amo13 commented 4 years ago

systemd is easy, I just put the following into ~/.config/systemd/user/tilda.service:

[Unit]
Description=Tilda drop-down terminal

[Service]
ExecStart=tilda --dbus

[Install]
WantedBy=default.target

and then I start tilda with systemctl --user start tilda. This should make no difference then issuing tilda --dbus by myself. The benefit is that I don't keep a terminal running (where I started tilda from) and I get the tilda logs directly into the system journal (journalctl --user-unit tilda)

amo13 commented 4 years ago

I installed gdb and recompiled tilda with the necessary options for debugging with gdb. But I need some guidance from here on how to produce meaningful output from gdb.

lanoxx commented 4 years ago

You can either start tilda with gdb or attach to an already running tilda instance. To start tilda with gdb run the following from the build dir:

gdb `./src/tilda`

and start tilda with run --dbus inside the gdb shell. Pass arguments for tilda to the run directive.

To attach to a running gdb run:

sudo gdb -p `pidof tilda`

Once inside gdb, you can do lots of things but most commonly you want to know:

For more functions, search for one of the many gdb cheatsheets that are on the internet.

From there on you will need to explore a bit what is happing with your tilda process and why closing a tab breaks things.

The tilda_window_close_current_tab is essentially what gets called when you hit <ctrl>+<shift>+w. Maybe start with that. The context menu gets called with tilda_context_menu_popup.

amo13 commented 4 years ago

Thank you.

Is the following of any help to you? What I did is:

[amo@bodet-pc collage]$ sudo gdb -p `pidof tilda`
[sudo] password for amo: 
GNU gdb (GDB) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 17720
[New LWP 17722]
[New LWP 17723]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
0x00007f223e521abf in poll () from /usr/lib/libc.so.6
(gdb) l
566     file = g_file_new_for_path (filename);
567     error = NULL;
568     gtk_css_provider_load_from_file (provider, file, &error);
569 
570     if (error) {
571         g_print ("Error: %s", error->message);
572         g_error_free (error);
573     }
574 
575     g_object_unref (file);
(gdb) c
Continuing.
[New Thread 0x7f22394be700 (LWP 17841)]
[New Thread 0x7f2238bed700 (LWP 17842)]
[Thread 0x7f22394be700 (LWP 17841) exited]
[Thread 0x7f2238bed700 (LWP 17842) exited]
[New Thread 0x7f2238bed700 (LWP 17865)]
[Detaching after fork from child process 17866]
[New Thread 0x7f22394be700 (LWP 17867)]
[New Thread 0x7f222bfff700 (LWP 17868)]
[Thread 0x7f22394be700 (LWP 17867) exited]
[Thread 0x7f2238bed700 (LWP 17865) exited]
bt
[Thread 0x7f222bfff700 (LWP 17868) exited]
^C
Thread 1 "tilda" received signal SIGINT, Interrupt.
0x00007f223e521abf in poll () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007f223e521abf in poll () at /usr/lib/libc.so.6
#1  0x00007f223e84a7a0 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f223e84b843 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#3  0x00007f223efb0b7f in gtk_dialog_run () at /usr/lib/libgtk-3.so.0
#4  0x000055ea6c6c32f3 in show_confirmation_dialog
    (message=0x55ea6c6d2440 "Are you sure you want to close this tab?", tw=<optimized out>) at src/tilda_window.c:135
#5  0x000055ea6c6c5352 in tilda_window_close_current_tab (tw=0x7ffcf4e6c020)
    at src/tilda_window.c:111
#6  0x00007f223f05e026 in  () at /usr/lib/libgtk-3.so.0
#7  0x00007f223e94561a in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#8  0x00007f223e92697e in  () at /usr/lib/libgobject-2.0.so.0
#9  0x00007f223e9295cc in g_signal_emit_valist ()
    at /usr/lib/libgobject-2.0.so.0
#10 0x00007f223e92b6b0 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#11 0x00007f223f046f51 in gtk_accel_group_activate () at /usr/lib/libgtk-3.so.0
#12 0x00007f223f0470ae in gtk_accel_groups_activate ()
    at /usr/lib/libgtk-3.so.0
#13 0x00007f223eda7f00 in gtk_window_activate_key () at /usr/lib/libgtk-3.so.0
#14 0x00007f223edad013 in  () at /usr/lib/libgtk-3.so.0
#15 0x00007f223f05ee1c in  () at /usr/lib/libgtk-3.so.0
#16 0x00007f223e92a0a0 in g_signal_emit_valist ()
    at /usr/lib/libgobject-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#17 0x00007f223e92b6b0 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#18 0x00007f223edc7c26 in  () at /usr/lib/libgtk-3.so.0
#19 0x00007f223ef0e14a in  () at /usr/lib/libgtk-3.so.0
#20 0x00007f223ef1161c in gtk_main_do_event () at /usr/lib/libgtk-3.so.0
#21 0x00007f223ec21f84 in  () at /usr/lib/libgdk-3.so.0
#22 0x00007f223ebcec34 in  () at /usr/lib/libgdk-3.so.0
#23 0x00007f223e8489be in g_main_context_dispatch ()
    at /usr/lib/libglib-2.0.so.0
#24 0x00007f223e84a831 in  () at /usr/lib/libglib-2.0.so.0
#25 0x00007f223e84b843 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#26 0x00007f223ef0abff in gtk_main () at /usr/lib/libgtk-3.so.0
#27 0x000055ea6c6b9ec8 in main (argc=<optimized out>, argv=<optimized out>)
    at src/tilda.c:795

EDIT: The backtrace suggests that I should have been confronted with a confirmation dialog for closing the tab, which I have not.

lanoxx commented 4 years ago

That output indeed helps.

For the moment a possible workaround would be to just disable the confirmation dialog. Try to check if the bug goes away if you disable it in the preferences under "Title and Command". Maybe that will help you to work around the bug until we can fix it. The confirmation dialogs are enabled by default since 1.5 and were disabled before.

Now that we know there is a problem with the confirmation dialog, we can try to fix it. I am just not quite sure why you do not see the dialog. Tilda just calls gtk_dialog_run which should show the dialog and block until you have either clicked confirm or cancel. Are you sure the confirmation dialog is really not there or maybe you are just not seeing it due to some bug?

amo13 commented 4 years ago

Awesome, that is a valid workaround! I can even consider it a fix for myself, since I don't want to confirm anyway ;) I reproduced the issue again, but I don't have any dialog anywhere.

Please tell me if there is anything more I can do to help you trace down and fix the issue!

lanoxx commented 4 years ago

Which desktop and which window manager are you using?

amo13 commented 4 years ago

I'm on Manjaro Linux (Archlinux) with Gnome 3.36 and Wayland

smekkley commented 4 years ago

I tried this commit but keybinding didn't work on Gnome wayland 3.34.

lanoxx commented 4 years ago

@smekkley If you are on wayland, then the toggle keybinding will not work. You will have to register a global hoteky under Gnome Settings that invokes the dbus-send command to send the toggle dbus signal to tilda (see amo13's commit at the top).

smekkley commented 4 years ago

It works perfectly as ever. Thanks a lot.

tzawlxih commented 3 years ago

Patch works like a charm. Thank you!

lanoxx commented 3 years ago

Finally merged, so this will make it into the next release of tilda. Sorry for all the tilda users on Wayland who had to wait so long for this. You will finally have a way to toggle tilda on Wayland, but for the moment you need to configure the hotkey manually to call something like dbus-send. This can probably be improved to make it a bit more convenient to setup.