I've managed to integrate zathura with osx so window manager like moom can recognize the window... however, yabai won't recognize the window when zathura is launched after yabai .. yabai will recognize it if yabai launched after zathura.. Anyone know why it's happened?
when yabai launched after zathura it will have log like this
EVENT_HANDLER_APPLICATION_ACTIVATED: zathura
but when zathura launched after yabai, there is no log like above
Zathura probably fail this check: https://github.com/koekeishiya/yabai/blob/master/src/process_manager.c#L57
To verify, quit yabai, quit zathura. Run yabai with debug output: yabai --verbose and launch zathura.
See my comment here https://github.com/koekeishiya/yabai/issues/439#issuecomment-597716114 for information regarding the different process-types that we check for.
Thanks for reply
To verify, quit yabai, quit zathura. Run yabai with debug output:
yabai --verboseand launch zathura.
When I launch zathura after yabai (with --verbose), it won't log anything about zathura
See my comment here #439 (comment) for information regarding the different process-types that we check for.
Thanks, I'll check it out
Oh, zathura actually marked as background process
process_is_observable: zathura was marked as background only! ignoring..
@koekeishiya do you have any advice how to avoid for zathura to being marked as background only process? Sorry, I have very litle knowledge about macOS development
I believe you need to somehow set the activation policy to NSApplicationActivationPolicyRegular
If the project is written in C or something that can call out to C, you can call the following function during/at the end of startup:
ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
# TransformProcessType is exported by the ApplicationServices framework
# kProcessTransformToUIElementApplication might be more appropriate if the application should not be visible in the Dock/Cmd-Tab selection.
With the changes made to the latest yabai master, it will then be able to detect that change and properly manage it. Note that the latest yabai master might even be able to pick this up now, without having to make further changes to Zathura.
Note that the latest yabai master might even be able to pick this up now, without having to make further changes to Zathura.
Oh, nice.. I tried and it works now .. thanks a lot
Fixed in the latest release.
Does not work for me, unfortunately. I'm on zathura 0.4.6 and yabai 3.2.1 on OSX 10.15.5. @drselump14 did you have to make any further changes to zathura?
Thanks in advance.
log when starting zathura while running yabai in verbose:
thread: 55398400 | EVENT_HANDLER_APPLICATION_LAUNCHED: zathura (97549) is not observable, subscribing to activationPolicy changes
thread: 49241536 | -[workspace_context observeValueForKeyPath:ofObject:change:context:]: activation policy changed for zathura (97549)
thread: 55398400 | EVENT_HANDLER_APPLICATION_LAUNCHED: zathura (97549) is not finished launching, subscribing to finishedLaunching changes
thread: 49241536 | -[workspace_context observeValueForKeyPath:ofObject:change:context:]: zathura (97549) finished launching
thread: 55398400 | EVENT_HANDLER_APPLICATION_LAUNCHED: could not observe notifications for zathura (97549) (ax_retry = 1)
thread: 55398400 | EVENT_HANDLER_APPLICATION_LAUNCHED: could not observe notifications for zathura (97549) (ax_retry = 1)
thread: 55398400 | EVENT_HANDLER_APPLICATION_LAUNCHED: could not observe notifications for zathura (97549) (ax_retry = 1)
I would also be intersted in how you made zathura work.
Most helpful comment
Does not work for me, unfortunately. I'm on zathura 0.4.6 and yabai 3.2.1 on OSX 10.15.5. @drselump14 did you have to make any further changes to zathura?
Thanks in advance.
log when starting zathura while running yabai in verbose:
thread: 55398400 | EVENT_HANDLER_APPLICATION_LAUNCHED: zathura (97549) is not observable, subscribing to activationPolicy changesthread: 49241536 | -[workspace_context observeValueForKeyPath:ofObject:change:context:]: activation policy changed for zathura (97549)thread: 55398400 | EVENT_HANDLER_APPLICATION_LAUNCHED: zathura (97549) is not finished launching, subscribing to finishedLaunching changesthread: 49241536 | -[workspace_context observeValueForKeyPath:ofObject:change:context:]: zathura (97549) finished launchingthread: 55398400 | EVENT_HANDLER_APPLICATION_LAUNCHED: could not observe notifications for zathura (97549) (ax_retry = 1)thread: 55398400 | EVENT_HANDLER_APPLICATION_LAUNCHED: could not observe notifications for zathura (97549) (ax_retry = 1)thread: 55398400 | EVENT_HANDLER_APPLICATION_LAUNCHED: could not observe notifications for zathura (97549) (ax_retry = 1)