movewin 1.1 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/movewin/winutils.c +7 -3
- data/lib/movewin.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
|
4
|
-
|
3
|
+
metadata.gz: a193b21672c8447a18c0d52b7d8c46acc72e4848
|
4
|
+
data.tar.gz: 110afbc6ef126e64dc154b0a70ebd2f21d6fb837
|
5
5
|
SHA512:
|
6
|
-
|
7
|
-
|
6
|
+
metadata.gz: 8e0f530fe1b99eaa8d1b98c7b49b6f2125937856859280f351d757b261ae60b5170393f7b07f48540a1d790cf7aa12b45318c1728d6818a7ee2d6c1138dc2160
|
7
|
+
data.tar.gz: 1eba09edc9672467643e5b3ab1cb4e0aebe77f4712038cba21253d6bf9c31511b3e2d57048b8b97d828ea297cfc23dde9fd875889d0c2913f5166c92393de6ea
|
data/ext/movewin/winutils.c
CHANGED
@@ -74,8 +74,11 @@ int EnumerateWindows(
|
|
74
74
|
if(layer > 0) continue;
|
75
75
|
|
76
76
|
/* Turn application name and title into string to match against */
|
77
|
+
appName = windowName = title = NULL;
|
77
78
|
appName = CFDictionaryCopyCString(window, kCGWindowOwnerName);
|
79
|
+
if(!appName || !*appName) goto skip;
|
78
80
|
windowName = CFDictionaryCopyCString(window, kCGWindowName);
|
81
|
+
if(!windowName || !*windowName) goto skip;
|
79
82
|
titleSize = strlen(appName) + strlen(" - ") + strlen(windowName) + 1;
|
80
83
|
title = (char *)malloc(titleSize);
|
81
84
|
snprintf(title, titleSize, "%s - %s", appName, windowName);
|
@@ -86,9 +89,10 @@ int EnumerateWindows(
|
|
86
89
|
count++;
|
87
90
|
}
|
88
91
|
|
89
|
-
|
90
|
-
free(
|
91
|
-
free(
|
92
|
+
skip:
|
93
|
+
if(title) free(title);
|
94
|
+
if(windowName) free(windowName);
|
95
|
+
if(appName) free(appName);
|
92
96
|
}
|
93
97
|
if(subPattern != pattern) free(subPattern);
|
94
98
|
|
data/lib/movewin.rb
CHANGED