|
|
|
@ -68,14 +68,14 @@ namespace MacUtils
@@ -68,14 +68,14 @@ namespace MacUtils
|
|
|
|
|
|
|
|
|
|
if (class_getInstanceMethod(delClass, shouldHandle)) |
|
|
|
|
{ |
|
|
|
|
if (class_replaceMethod(delClass, shouldHandle, (IMP)dockClickHandler, "B@:")) |
|
|
|
|
if (class_replaceMethod(delClass, shouldHandle, reinterpret_cast<IMP>(dockClickHandler), "B@:")) |
|
|
|
|
qDebug("Registered dock click handler (replaced original method)"); |
|
|
|
|
else |
|
|
|
|
qWarning("Failed to replace method for dock click handler"); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if (class_addMethod(delClass, shouldHandle, (IMP)dockClickHandler, "B@:")) |
|
|
|
|
if (class_addMethod(delClass, shouldHandle, reinterpret_cast<IMP>(dockClickHandler), "B@:")) |
|
|
|
|
qDebug("Registered dock click handler"); |
|
|
|
|
else |
|
|
|
|
qWarning("Failed to register dock click handler"); |
|
|
|
|