[Github-comments] Re: [geany/geany-plugins] GeanyLua has an X11 dependency (Issue #1230)

2023-08-18 Thread Jiří Techet via Github-comments
Closed #1230 as completed via #1236. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/1230#event-10132953261 You are receiving this because you are subscribed to this thread. Message ID:

[Github-comments] Re: [geany/geany-plugins] GeanyLua has an X11 dependency (Issue #1230)

2023-03-05 Thread xiota via Github-comments
`geany.keygrab()` doesn't work on X11. Looks like the callback function either doesn't return or doesn't set the flag to signal that a key has been pressed. Built and tested with both Lua 5.1 and LuaJIT with same result. Example Lua code: ``` geany.status("keygrab - start") key = geany.keygra

[Github-comments] Re: [geany/geany-plugins] GeanyLua has an X11 dependency (Issue #1230)

2023-03-04 Thread elextr via Github-comments
> Suspend Lua execution while waiting for a result from the callback. It doesn't suspend, `keygrab()` just sleep loops [here](https://github.com/geany/geany-plugins/blob/2665511f731e613944815ab62885ecf52e3037e6/geanylua/glspi_app.c#L589) and seems to use the global variable `km` to communicate b

[Github-comments] Re: [geany/geany-plugins] GeanyLua has an X11 dependency (Issue #1230)

2023-03-04 Thread xiota via Github-comments
I took a look at the code. Problem is I don't know how to... * Suspend Lua execution while waiting for a result from the callback. * Return a result from the callback or resume Lua execution from the callback. What are the use cases for `geany.keygrab`? None of the example scripts use it, and

[Github-comments] Re: [geany/geany-plugins] GeanyLua has an X11 dependency (Issue #1230)

2023-03-04 Thread elextr via Github-comments
Hint: have a look at Geany's `keybindings.c` and how it collects keystrokes. IIRC there is a GTK function to connect_before on an event, so that callback would grab the key before Geany (if it returned TRUE, FALSE passes the key to the next connection). -- Reply to this email directly or view

[Github-comments] Re: [geany/geany-plugins] GeanyLua has an X11 dependency (Issue #1230)

2023-03-03 Thread elextr via Github-comments
No, on looking closer its nothing to do with keybindings (AFAICT) its the implementation of `keygrab()`. 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

[Github-comments] Re: [geany/geany-plugins] GeanyLua has an X11 dependency (Issue #1230)

2023-03-03 Thread xiota via Github-comments
Are you able to tell whether this is for "The old way" described [here](https://plugins.geany.org/geanylua/geanylua-keys.html)? If so, I think it can be removed, since it's already been deprecated. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/iss