-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeanyLua has an X11 dependency #1230
Comments
Are you able to tell whether this is for "The old way" described here? If so, I think it can be removed, since it's already been deprecated. |
No, on looking closer its nothing to do with keybindings (AFAICT) its the implementation of That should be implemented by adding a signal handler for keystrokes before Geanys on the normal GTK keystroke signals "key-press-event" and "key-release-event" (IIRC). That will still allow it to block keystrokes from Geany (bad form, but possibly necessary) but not have to dive to the low level of event filters on widgets and will deliver a portable |
Hint: have a look at Geany's |
I took a look at the code. Problem is I don't know how to...
What are the use cases for
So the creation of multi-key/step shortcuts? Is that really useful? |
It doesn't suspend, What I'm suggesting is that it be rewritten to not use window filters but to replace this with a call to It will require rewriting the signal handler since the returned event data is different to either existing one, but its the same for all platforms so its portable. Also Glib/GTK does the keymap crap before it returns the event, so all that can be deleted, yay less code. Since it seems to work for those who use it, the sleep loop approach can probably be kept no matter how smelly it is 👃
Just because neither you nor I am smart enough to figure a use-case immediately doesn't mean someone else hasn't, the function has been there for a long time (at least since 2009 when the plugin was moved to geany-plugins), so no it can't be removed. |
Looks like the callback function either doesn't return or doesn't set the flag to signal that a key has been pressed so that the wait loop can exit. The relevant code is the same in 1.38 and the current git revision. Example Lua code:
Status window shows only:
Keyboard input continues to be sent to the editor. Geany has to be force closed. |
Geany Lua depends on getting X11 events here. This means it won't work on Windows, Macos or Wayland AFAICT.
[Edit: on closer inspection there is a
#else
clause for Windows, so its handled]Should be using the "official" plugin keybinding interface instead, making it portable.
The text was updated successfully, but these errors were encountered: