Skip to content

Commit

Permalink
Cursors no longer lazy load on osx, reinitialize after reset
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzielenski committed Dec 31, 2018
1 parent f64cbde commit cdd2bba
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Mousecape/Mousecape.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Mousecape/Mousecape-Prefix.pch";
INFOPLIST_FILE = "Mousecape/Mousecape-Info.plist";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.8;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
WRAPPER_EXTENSION = app;
Expand All @@ -1143,7 +1143,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Mousecape/Mousecape-Prefix.pch";
INFOPLIST_FILE = "Mousecape/Mousecape-Info.plist";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MACOSX_DEPLOYMENT_TARGET = 10.8;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
WRAPPER_EXTENSION = app;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "HDTemplate.png"
"filename" : "HDTemplate.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "SDTemplate.png"
"filename" : "SDTemplate.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "applied.png"
"filename" : "applied.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "dz.png"
"filename" : "dz.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
2 changes: 1 addition & 1 deletion Mousecape/Mousecape/Mousecape-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1640</string>
<string>1656</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
7 changes: 6 additions & 1 deletion Mousecape/mousecloak/restore.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ void resetAllCursors() {
MMLog("Restoring core cursors...");
if (CoreCursorUnregisterAll(CGSMainConnectionID()) == 0) {
MCSetDefault(NULL, MCPreferencesAppliedCursorKey);

for (int x = 0; x < 45; x++) {
CoreCursorSet(CGSMainConnectionID(), x);
}

MMLog(BOLD GREEN "Successfully restored all cursors." RESET);
} else
MMLog(BOLD RED "Received an error while restoring core cursors." RESET);
}
}

0 comments on commit cdd2bba

Please sign in to comment.