Skip to content

Commit dc90325

Browse files
committed
Added info about blacklist in info.txt.
Commented out two unnecessary errors. Resource version will be 0.7.9.2 for 0.8b2. Fixed errors in WindowFinder.
1 parent 3bb0c43 commit dc90325

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

localization/en-US/strings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Click the tray icon and then click the window you want to blacklist. \
3131
A popup will appear with information about that window. \
3232
For more tricky windows, use the delayed find.\n\
3333
\n\
34-
Note that you can't blacklist windows by using the child or component information!\n\
34+
Note that you can't blacklist windows in AltDrag by using the child or component information!\n\
3535
\n\
3636
Read more on wiki page: "APP_URL"\n\
3737
Send feedback to recover89@gmail.com"

windowfinder.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR szCmdLine, in
123123
//Load icon
124124
icon = LoadImage(hInst,L"icon",IMAGE_ICON,0,0,LR_DEFAULTCOLOR);
125125
if (icon == NULL) {
126-
Error(L"LoadImage('icon')", L"Fatal error.", GetLastError(), __LINE__);
126+
Error(L"LoadImage('icon')", L"Fatal error.", GetLastError(), TEXT(__FILE__), __LINE__);
127127
PostQuitMessage(1);
128128
}
129129

@@ -199,7 +199,7 @@ int UpdateTray() {
199199
while (Shell_NotifyIcon((tray_added?NIM_MODIFY:NIM_ADD),&traydata) == FALSE) {
200200
tries++;
201201
if (tries >= 10) {
202-
Error(L"Shell_NotifyIcon(NIM_ADD/NIM_MODIFY)", L"Failed to update tray icon.", GetLastError(), __LINE__);
202+
Error(L"Shell_NotifyIcon(NIM_ADD/NIM_MODIFY)", L"Failed to update tray icon.", GetLastError(), TEXT(__FILE__), __LINE__);
203203
return 1;
204204
}
205205
Sleep(100);
@@ -217,7 +217,7 @@ int RemoveTray() {
217217
}
218218

219219
if (Shell_NotifyIcon(NIM_DELETE,&traydata) == FALSE) {
220-
Error(L"Shell_NotifyIcon(NIM_DELETE)", L"Failed to remove tray icon.", GetLastError(), __LINE__);
220+
Error(L"Shell_NotifyIcon(NIM_DELETE)", L"Failed to remove tray icon.", GetLastError(), TEXT(__FILE__), __LINE__);
221221
return 1;
222222
}
223223

@@ -241,7 +241,7 @@ DWORD WINAPI FindWnd(LPVOID arg) {
241241
HWND hwnd_component, hwnd;
242242
if ((hwnd_component=WindowFromPoint(pt)) == NULL) {
243243
#ifdef DEBUG
244-
Error(L"WindowFromPoint()", L"FindWnd()", GetLastError(), __LINE__);
244+
Error(L"WindowFromPoint()", L"FindWnd()", GetLastError(), TEXT(__FILE__), __LINE__);
245245
#endif
246246
}
247247
hwnd = GetAncestor(hwnd_component,GA_ROOT);
@@ -250,7 +250,7 @@ DWORD WINAPI FindWnd(LPVOID arg) {
250250
RECT wnd;
251251
if (GetWindowRect(hwnd,&wnd) == 0) {
252252
#ifdef DEBUG
253-
Error(L"GetWindowRect()", L"FindWnd()", GetLastError(), __LINE__);
253+
Error(L"GetWindowRect()", L"FindWnd()", GetLastError(), TEXT(__FILE__), __LINE__);
254254
#endif
255255
}
256256
POINT pt_child;
@@ -259,7 +259,7 @@ DWORD WINAPI FindWnd(LPVOID arg) {
259259
HWND hwnd_child;
260260
if ((hwnd_child=ChildWindowFromPoint(hwnd,pt_child)) == NULL) {
261261
#ifdef DEBUG
262-
Error(L"ChildWindowFromPoint()", L"FindWnd()", GetLastError(), __LINE__);
262+
Error(L"ChildWindowFromPoint()", L"FindWnd()", GetLastError(), TEXT(__FILE__), __LINE__);
263263
#endif
264264
}
265265

@@ -394,21 +394,21 @@ int HookMouse() {
394394
wchar_t path[MAX_PATH];
395395
GetModuleFileName(NULL, path, sizeof(path)/sizeof(wchar_t));
396396
if ((hinstDLL=LoadLibrary(path)) == NULL) {
397-
Error(L"LoadLibrary()", L"Check the "APP_NAME" website if there is an update, if the latest version doesn't fix this, please report it.", GetLastError(), __LINE__);
397+
Error(L"LoadLibrary()", L"Check the "APP_NAME" website if there is an update, if the latest version doesn't fix this, please report it.", GetLastError(), TEXT(__FILE__), __LINE__);
398398
return 1;
399399
}
400400

401401
//Get address to mouse hook (beware name mangling)
402402
HOOKPROC procaddr = (HOOKPROC)GetProcAddress(hinstDLL,"LowLevelMouseProc@12");
403403
if (procaddr == NULL) {
404-
Error(L"GetProcAddress('LowLevelMouseProc@12')", L"Check the "APP_NAME" website if there is an update, if the latest version doesn't fix this, please report it.", GetLastError(), __LINE__);
404+
Error(L"GetProcAddress('LowLevelMouseProc@12')", L"Check the "APP_NAME" website if there is an update, if the latest version doesn't fix this, please report it.", GetLastError(), TEXT(__FILE__), __LINE__);
405405
return 1;
406406
}
407407

408408
//Set up the hook
409409
mousehook = SetWindowsHookEx(WH_MOUSE_LL,procaddr,hinstDLL,0);
410410
if (mousehook == NULL) {
411-
Error(L"SetWindowsHookEx(WH_MOUSE_LL)", L"Check the "APP_NAME" website if there is an update, if the latest version doesn't fix this, please report it.", GetLastError(), __LINE__);
411+
Error(L"SetWindowsHookEx(WH_MOUSE_LL)", L"Check the "APP_NAME" website if there is an update, if the latest version doesn't fix this, please report it.", GetLastError(), TEXT(__FILE__), __LINE__);
412412
return 1;
413413
}
414414

@@ -433,9 +433,7 @@ DWORD WINAPI DelayedUnhookMouse() {
433433

434434
//Unhook the mouse hook
435435
if (UnhookWindowsHookEx(mousehook) == 0) {
436-
#ifdef DEBUG
437-
Error(L"UnhookWindowsHookEx(mousehook)", L"UnhookMouse()", GetLastError(), __LINE__);
438-
#endif
436+
Error(L"UnhookWindowsHookEx(mousehook)", L"UnhookMouse()", GetLastError(), TEXT(__FILE__), __LINE__);
439437
return 1;
440438
}
441439

0 commit comments

Comments
 (0)