From 976beb6c35b4cfe1dd15c3265303ca153ba3f7ce Mon Sep 17 00:00:00 2001 From: Simon Hofmann Date: Fri, 31 Jul 2020 09:30:12 +0200 Subject: [PATCH] (#19) Introduces OS specific source folders --- src/{highlightwindow_linux.c => linux/highlightwindow.c} | 4 ++-- src/{ => linux}/xdisplay.c | 0 src/{highlightwindow_macos.m => macos/highlightwindow.m} | 4 ++-- src/{highlightwindow_win32.c => win32/highlightwindow.c} | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/{highlightwindow_linux.c => linux/highlightwindow.c} (93%) rename src/{ => linux}/xdisplay.c (100%) rename src/{highlightwindow_macos.m => macos/highlightwindow.m} (97%) rename src/{highlightwindow_win32.c => win32/highlightwindow.c} (96%) diff --git a/src/highlightwindow_linux.c b/src/linux/highlightwindow.c similarity index 93% rename from src/highlightwindow_linux.c rename to src/linux/highlightwindow.c index 6d20f35..0611611 100644 --- a/src/highlightwindow_linux.c +++ b/src/linux/highlightwindow.c @@ -1,7 +1,7 @@ #include #include #include -#include "highlightwindow.h" +#include "../highlightwindow.h" void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, long duration, float opacity) { Display *d = XOpenDisplay(NULL); @@ -23,7 +23,7 @@ void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, lo Window overlay = XCreateWindow( d, root, x, y, width, height, 0, - vinfo.depth, InputOutput, + vinfo.depth, InputOutput, vinfo.visual, CWOverrideRedirect | CWColormap | CWBackPixel | CWBorderPixel, &attrs ); diff --git a/src/xdisplay.c b/src/linux/xdisplay.c similarity index 100% rename from src/xdisplay.c rename to src/linux/xdisplay.c diff --git a/src/highlightwindow_macos.m b/src/macos/highlightwindow.m similarity index 97% rename from src/highlightwindow_macos.m rename to src/macos/highlightwindow.m index 9846c68..bab4537 100644 --- a/src/highlightwindow_macos.m +++ b/src/macos/highlightwindow.m @@ -1,4 +1,4 @@ -#include "highlightwindow.h" +#include "../highlightwindow.h" #import void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, long duration, float opacity) { @@ -24,4 +24,4 @@ void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, lo }]; [NSApp run]; [pool release]; -} \ No newline at end of file +} diff --git a/src/highlightwindow_win32.c b/src/win32/highlightwindow.c similarity index 96% rename from src/highlightwindow_win32.c rename to src/win32/highlightwindow.c index 6eba4cd..8c27e30 100644 --- a/src/highlightwindow_win32.c +++ b/src/win32/highlightwindow.c @@ -1,9 +1,9 @@ #ifndef UNICODE #define UNICODE -#endif +#endif #include -#include "highlightwindow.h" +#include "../highlightwindow.h" #define ID_CLOSE_TIMER 1001 @@ -20,7 +20,7 @@ void showHighlightWindow(int32_t x, int32_t y, int32_t width, int32_t height, lo wc.lpszClassName = CLASS_NAME; wc.hbrBackground = CreateSolidBrush(RGB(255, 0, 0)); - RegisterClass(&wc); + RegisterClass(&wc); HWND hwnd = CreateWindowEx( WS_EX_LAYERED|WS_EX_TOPMOST|WS_EX_TRANSPARENT|WS_EX_TOOLWINDOW,