lanoxx / tilda

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

SEGFAULT on GNOME 3.16 Wayland #150

Closed bugabinga closed 9 years ago

bugabinga commented 9 years ago

When starting tilda on Arch Linux with Gnome 3.16 on Wayland, the application segfaults.

http://ix.io/iB1

I can provide the core dump if necessary.

lanoxx commented 9 years ago

Tilda does not work with wayland.

lanoxx commented 9 years ago

Im closing this for now, as I dont think its likely we port tilda to wayland in the near future.

There are two things blocking this:

  1. The global hotkey to pull down tilda depends directly on X11, we need to replace it with something that is independent to X11. Im thinking maybe this can be done with libinput, but I really have no idea and also no time to look into this.
  2. Wayland does not allow windows to globally reposition themselves as there are no global window coordinates. So the current way tilda positions itself on the screen will not work on wayland. We need to find an alternative. This probably means that tilda needs to become a wayland shell plugin or something similar. I am not familiar with wayland development so I cant really say whats the best way to solve this.

If someone fells up to this, go and write a patch and I will be happy to review/merge it into tilda as long as it does not conflict with tilda running on X11. A compile time option would be nice.

If anyone wants to work on this please reopen.

johannesjo commented 7 years ago

@lanoxx I'm not sure what what you mean by "Wayland does not allow windows to globally reposition themselves as there are no global window". With lwsm which uses the x11 wrapper for node it's no problem to position windows wherever I want even with Wayland. Unfortunately I know next to nothing about C so I don't really feel comfortable developing a patch for this.

lanoxx commented 6 years ago

What I mean by this is that Xorg and Wayland have two different philosophies when it comes to window management. On Xorg every application knows where it is positioned on the screen and can reposition itself using programming apis that are provided by X11. GTK has nice wrapper functions for these (e.g. gtk_window_move ). Tilda is using these APIs to implement the positioning of the main tilda window such that it is located at some edge of the screen (usually the top edge) and that you see some nice animation when tilda slides down (if animations are enabled).

A second dependency that tilda has on Xorg is the capturing of the global hotkey such that you can use some key combination to pull down tilda even when tilda is hidden and does not have the input focus of the keyboard or mouse. This is done using the XGrabKey functionality of Xorg.

On Wayland as far as I know applications do not have access to this kind of API. So I do not know how to reposition the tilda window. In addition the functionality to receive global key combinations will need to be rewritten to work both for wayland and Xorg.

johannesjo commented 6 years ago

Thank you very much for explaining! I'm new to all this, but might it be a solution to use standard X11 and wrap the application via XWayland?

lanoxx commented 6 years ago

Possibly, as discussed in https://github.com/lanoxx/tilda/issues/314 guake seems to have found a solution, if we can apply that to tilda then maybe it can be fixed.

valentt commented 6 years ago

Got tilda working on Wayland! Just change your launcher to use this command line: env GDK_BACKEND=x11 tilda

opensamba commented 6 years ago

I think would be useful for the tilda user know this immediately when they run tilda on the terminal Maybe instead of this error

$ tilda
zsh: segmentation fault (core dumped)  tilda

A better way to inform the users would to have an error like:

$ tilda
Error: tilda doesn't work on Wayland, see issue #150
elektronik2k5 commented 6 years ago

@opensamba, exactly! + Link to issue (instead of only number).

smekkley commented 4 years ago

Guake and tilix provides a command like option to toggle the terminal. If the terminal is not started yet, it starts the new process, if it's already started and hidden, it shows, if it's already shown it hides, all by one command option. If tilda also supports this, something like tilda --quake, then the wayland issue gets solved.

What do you think @lanoxx ?

lanoxx commented 4 years ago

The newer releases of tilda do not segfault anymore on Wayland since they now enable the X11 backend by default. What is still missing is a way to toggle the terminal. Tilda will have a DBus interface in the next release that can be used to toggle the Tilda window, see pull request: https://github.com/lanoxx/tilda/pull/407

That should resolve this issue.

smekkley commented 4 years ago

Oh. Ok. I missed that, sorry. By the way, I think this is greatest drop down terminal, I've used so far, so fast! Thanks a lot.

lanoxx commented 3 years ago

FYI, I recently merged #407 so the next release of tilda will have DBus support.