dreamcat4 / skippy-xd

A full-screen Exposé-style standalone task switcher for X11.
GNU General Public License v2.0
100 stars 12 forks source link

Daemon crashes #2

Closed vredesbyyrd closed 1 year ago

vredesbyyrd commented 6 years ago

System Info:

Kernel: 4.19.4-1-ck (arch)
DE: Budgie 
Xorg-Server: 1.20.3-1

Hi, I stumbled on your fork when scanning through pull requests/issues on richardgv repo. Thank you for continuing development on this great tool.

Although its awesome, I do not necessarily need the alt-tab behavior that you added, but I figured I would give your code a whirl since you are currently contributing a lot. I cant seem to get it to work though.

First, with richardgv's repo I simply bound 'three finger swipe up' to /usr/bin/skippy-xd , which works fine. With your repo I followed the recommendation and started the daemon, then call skippy-xd-runner --toggle.

ISSUE:

When activating the expose', if the cursor moves off of any window skippy-xd will immediately close. I call skippy with a touchpad gesture so the majority of the time it makes sense to pick a window with the cursor.

I also noticed the daemon is crashing:

config_load(): config file found. using "/home/clu/.config/skippy-xd/skippy-xd.rc"
wm_check(): Your WM looks EWMH compliant.
main(): Running as daemon...
main(): Finished flushing pipe "/tmp/skippy-xd-fifo".
mainloop(): Received pipe command: 4
mainloop(): EOF reached on pipe "/tmp/skippy-xd-fifo".
mainloop(): PIPEHUP on pipe "/tmp/skippy-xd-fifo".
wm_get_stack_sub(): Retrieved window stack from _NET_CLIENT_LIST.
printfefWindowName(): window = skippy-xd-runner  /home/c...
mainloop(): PIPEHUP on pipe "/tmp/skippy-xd-fifo".
[    61.22 ] error 8 (BadMatch) request 42 minor 0 serial 417 ("BadMatch (invalid parameter attributes)")
clientwin_handle(): else if (ev->type == FocusIn) {
clientwin_handle(): main window id = 0x05400002
printfefWindowName(): client window = skippy-xd main window
clientwin_handle(): client window id = 0x03a00007
printfefWindowName(): event window = skippy-xd mini window of 0x03a00007
printfefXFocusChangeEvent(): event window id = 0x05400028
printfefXFocusChangeEvent(): evf->mode = NotifyNormal
printfefXFocusChangeEvent(): evf->detail = NotifyPointer

clientwin_handle(): else if (ev->type == FocusOut) {
clientwin_handle(): main window id = 0x05400002
printfefWindowName(): client window = skippy-xd main window
clientwin_handle(): client window id = 0x03a00007
printfefWindowName(): event window = skippy-xd mini window of 0x03a00007
printfefXFocusChangeEvent(): event window id = 0x05400028
printfefXFocusChangeEvent(): evf->mode = NotifyNormal
printfefXFocusChangeEvent(): evf->detail = NotifyPointer

clientwin_handle(): else if (ev->type == FocusIn) {
clientwin_handle(): main window id = 0x05400002
printfefWindowName(): client window = skippy-xd main window
clientwin_handle(): client window id = 0x03a00007
printfefWindowName(): event window = skippy-xd mini window of 0x03a00007
printfefXFocusChangeEvent(): event window id = 0x05400028
printfefXFocusChangeEvent(): evf->mode = NotifyNormal
printfefXFocusChangeEvent(): evf->detail = NotifyAncestor

clientwin_handle(): Key 36 (Return) occured.
mainloop(): Received pipe command: 4
mainloop(): PIPEHUP on pipe "/tmp/skippy-xd-fifo".
wm_get_stack_sub(): Retrieved window stack from _NET_CLIENT_LIST.
printfefWindowName(): window = skippy-xd-runner  /home/c...
[    32.30 ] error 8 (BadMatch) request 42 minor 0 serial 420 ("BadMatch (invalid parameter attributes)")
clientwin_handle(): else if (ev->type == FocusIn) {
clientwin_handle(): main window id = 0x05200002
printfefWindowName(): client window = skippy-xd main window
clientwin_handle(): client window id = 0x03a00007
printfefWindowName(): event window = skippy-xd mini window of 0x03a00007
printfefXFocusChangeEvent(): event window id = 0x05200028
printfefXFocusChangeEvent(): evf->mode = NotifyNormal
printfefXFocusChangeEvent(): evf->detail = NotifyPointer

clientwin_handle(): else if (ev->type == FocusOut) {
clientwin_handle(): main window id = 0x05200002
printfefWindowName(): client window = skippy-xd main window
clientwin_handle(): client window id = 0x03a00007
printfefWindowName(): event window = skippy-xd mini window of 0x03a00007
printfefXFocusChangeEvent(): event window id = 0x05200028
printfefXFocusChangeEvent(): evf->mode = NotifyNormal
printfefXFocusChangeEvent(): evf->detail = NotifyPointer

clientwin_handle(): else if (ev->type == FocusIn) {
clientwin_handle(): main window id = 0x05200002
printfefWindowName(): client window = skippy-xd main window
clientwin_handle(): client window id = 0x03a00007
printfefWindowName(): event window = skippy-xd mini window of 0x03a00007
printfefXFocusChangeEvent(): event window id = 0x05200028
printfefXFocusChangeEvent(): evf->mode = NotifyNormal
printfefXFocusChangeEvent(): evf->detail = NotifyAncestor

clientwin_handle(): Key 36 (Return) occured.
clientwin_handle(): Key 114 (Right) occured.

For now I will stay on richardgv's but if you want any info from me i'll gladly do whatever I can. For a long time GNOMES own implementation of an expose' mode was the only thing preventing me from moving to Budgie, since it lacked anything comparable. The moment I discovered skippy-xd I made the switch. So I am very grateful to see someone is continuing to develop skippy-xd.

dreamcat4 commented 6 years ago

Thank you for reporting these.

It seems you are talking about 2 different issues here:

I'm not entirely sure what your mouse cursor is doing when you execute the swipe gesture. Perhaps ot could be one of 2 things:

1) A keypress or mouse click is registered just before skippy window is opened. But skippy opens too quickly and immediately responds to the [enter] key event that it shouldn't have. This is an issue previously alluded to before I came along here.

I think there was some solution discussed in a previous issue, or in the older version of the file README.md. But I cant remember what that was.

2) The gesture ends up registering either a mouse or keyboard even after skippy has opened. Which is in addition to the global gesture used to invoke skippy.

This input event might be:

The way skippy is setup to work, any of those above ^ events will dismiss the skippy main window, when there is no focus on any sub-windows (the previews). So to solve that problem may need to either:


Not certain what is going on by the log provided, because it's showing skippy-xd-runner appearing as a window. Well you probably don't want that thing to appear as a window when it's launched.

But also the [enter] key seems to get pressed twice. Plus multiple focus in and focus out events. And the Right cursor key.

Another question: What happens if you run the newer dreamcat4/skippy executable without invoking it through the runner scipt. (hae the daemon running in the backgound first, then invoke skippy-xd --activate). Like the old way.

In fact what does --activate do compared to --toggle, when connected up to your 3 finger gesture? Does it still dismiss itself immediately? As that would suggest a double-activation of the gesture. Please investigate a little further if you can. Kind Regards.

vredesbyyrd commented 5 years ago

Thank you for the detailed ideas.

After further testing I think I was able to get closer to finding whats going wrong. Although I cant answer why as I am not familiar with skippys code and dont know any C . First, whether I am using the touchpad gesture to execute skippy-xd or the command line appears irrelevant. The results are the same.

LOGS FROM OLD BRANCH:

Started Daemon via Skippy-xd --start-daemon

Execute skippy-xd --toggle

wm_check(): Your WM looks EWMH compliant.
main(): Running as daemon...
main(): Finished flushing pipe "/tmp/skippy-xd-fifo".
mainloop(): Received pipe command: 4
wm_get_stack_sub(): Retrieved window stack from _NET_CLIENT_LIST.
mainloop(): PIPEHUP on pipe "/tmp/skippy-xd-fifo".
[   155.31 ] error 8 (BadMatch) request 42 minor 0 serial 366 ("BadMatch (invalid parameter attributes)")
clientwin_handle(): KeyRelease 36 (Return) ignored.
clientwin_handle(): Quitting.

So it looks like there are errors here, but the daemon stays running and everything continues to work without any perceived issues. If the cursor leaves a window nothing happens, unless I deliberately left click outside of a window only then will it leave the 'overview'. Thats preferred behavior imo.

LOGS FROM NEW BRANCH

Started Daemon via Skippy-xd --start-daemon

Execute skippy-xd --toggle

config_load(): config file found. using "/home/clu/.config/skippy-xd/skippy-xd.rc"
wm_check(): Your WM looks EWMH compliant.
main(): Running as daemon...
main(): Finished flushing pipe "/tmp/skippy-xd-fifo".
mainloop(): Received pipe command: 4
wm_get_stack_sub(): Retrieved window stack from _NET_CLIENT_LIST.
printfefWindowName(): window = fish  /home/clu
mainloop(): PIPEHUP on pipe "/tmp/skippy-xd-fifo".
[     7.93 ] error 8 (BadMatch) request 42 minor 0 serial 416 ("BadMatch (invalid parameter attributes)")
clientwin_handle(): else if (ev->type == FocusIn) {
clientwin_handle(): main window id = 0x04400002
printfefWindowName(): client window = skippy-xd main window
clientwin_handle(): client window id = 0x03a00007
printfefWindowName(): event window = skippy-xd mini window of 0x03a00007
printfefXFocusChangeEvent(): event window id = 0x04400028
printfefXFocusChangeEvent(): evf->mode = NotifyNormal
printfefXFocusChangeEvent(): evf->detail = NotifyPointer

clientwin_handle(): else if (ev->type == FocusOut) {
clientwin_handle(): main window id = 0x04400002
printfefWindowName(): client window = skippy-xd main window
clientwin_handle(): client window id = 0x03a00007
printfefWindowName(): event window = skippy-xd mini window of 0x03a00007
printfefXFocusChangeEvent(): event window id = 0x04400028
printfefXFocusChangeEvent(): evf->mode = NotifyNormal
printfefXFocusChangeEvent(): evf->detail = NotifyPointer

clientwin_handle(): else if (ev->type == FocusIn) {
clientwin_handle(): main window id = 0x04400002
printfefWindowName(): client window = skippy-xd main window
clientwin_handle(): client window id = 0x03a00007
printfefWindowName(): event window = skippy-xd mini window of 0x03a00007
printfefXFocusChangeEvent(): event window id = 0x04400028
printfefXFocusChangeEvent(): evf->mode = NotifyNormal
printfefXFocusChangeEvent(): evf->detail = NotifyAncestor

clientwin_handle(): Key 36 (Return) occured.
fish: “skippy-xd --start-daemon” terminated by signal SIGSEGV (Address boundary error)

After executing skippy-xd --toggle to open the 'overview'...the cursor was on a Tilda (terminal) and I moved the cursor off that window and onto the background via touchpad. Which appears to have crashed the daemon so obviously that dropped me back to the desktop.

Whether I use --toggle or --activate doesn't seem to matter. Both show the exact same behavior.

My main takeaway from comparing the two 'branches' was from the differences in this line:

OLD BRANCH

clientwin_handle(): KeyRelease 36 (Return) ignored.

NEW BRANCH

clientwin_handle(): Key 36 (Return) occured.

It seems moving the cursor off of a window in the old branch is ignored unless you actually click

If there is anything else you could use from me let me know. Thanks for your time!

EDIT:

Just noticed...the pointer doesn't actually have to leave the window to drop back to the desktop. Any pointer movement at all will automatically leave the overview. hmmm.