Page MenuHomePhabricator

Use Qt signal for macOS Dock icon click event
ClosedPublic

Authored by Fabien on Nov 20 2019, 08:38.

Details

Summary
This moves the Dock icon click reaction code to the common place and
allows some cleanup in obj_c code.

According to the Apple's docs `class_replaceMethod` behaves as
`class_addMethod`, if the method identified by name does not yet exist;
or as `method_setImplementation`, if it does exist.

Partial backport of core PR14123 (commit ):
https://github.com/bitcoin/bitcoin/pull/14123/commits/2464925e7be832d4926b6204169bbbc1646c6368

Test Plan

Build and run on OSX.
Check the dock icon is working as expected.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

deadalnix added inline comments.
src/qt/macdockiconhandler.h
15 ↗(On Diff #14222)

Fix layout

This revision is now accepted and ready to land.Nov 20 2019, 14:09
This revision was landed with ongoing or failed builds.Nov 20 2019, 16:29
This revision was automatically updated to reflect the committed changes.