KIO/Mac : make kiod5 an "agent"
ClosedPublic

Authored by rjvbb on Aug 10 2017, 8:40 PM.

Details

Summary

This introduces a similar change to kiod5 that was already made to other comparable background applications:

1 the LSUIElement InfoDict key is set, causing the application to run like an "agent" (without Dock or AppSwitcher presence)
2 in case of kiod5, this state has to be confirmed just before calling QApplication::exec() (failure to do so disables text inputs in the dialogs the application may post)
3 when a password dialog is posted the application (kiod5) is brought to the foreground instead of attaching the dialog to the application responsible for the request.

Test Plan

works as intended on Mac, no change elsewhere.

It might be useful to include the functions used in 1) and 2) above in KWindowSystem to avoid unnecessary duplication (and having to introduce ditto ObjC files).

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rjvbb created this revision.Aug 10 2017, 8:40 PM
dfaure requested changes to this revision.Aug 10 2017, 9:16 PM

Forgot to git add kiod_agent.mm?

Looks good otherwise.

src/kiod/kiod_main.cpp
132

s/make disable/disable/

This revision now requires changes to proceed.Aug 10 2017, 9:16 PM
rjvbb updated this revision to Diff 17997.Aug 11 2017, 11:06 AM
rjvbb edited edge metadata.
rjvbb edited the summary of this revision. (Show Details)

Forgot a git add indeed, as well as a final bit of proofreading.

rjvbb set the repository for this revision to R241 KIO.Aug 11 2017, 11:06 AM

Forgot to git add kiod_agent.mm?

In fact, I see I have a comparable patch for kioslave, but simpler because AFAICT it won't ever put up a GUI itself.

What would be an appropriate place in KIO/core where we could put the 2 functions so they can be shared?

rjvbb updated this revision to Diff 18037.Aug 12 2017, 8:00 AM

I clearly didn't have my eyes aligned with their sockets ... this should finally be the complete patch.

rjvbb set the repository for this revision to R241 KIO.Aug 12 2017, 8:00 AM
dfaure accepted this revision.Aug 12 2017, 10:23 PM
This revision is now accepted and ready to land.Aug 12 2017, 10:23 PM
This revision was automatically updated to reflect the committed changes.