diff --git a/switcher.cpp b/switcher.cpp index 94da00f0..068703ef 100644 --- a/switcher.cpp +++ b/switcher.cpp @@ -165,6 +165,22 @@ bool Switcher::isWindowFullscreen() { #ifdef __APPLE__ bool Switcher::isWindowFullscreen() { //TODO: implement the MAC OS version + string cmd = "osascript -e + 'global frontApp, frontAppName, windowTitle + set windowTitle to "" + tell application \"System Events\" + set frontApp to first application process whose frontmost is true + set frontAppName to name of frontApp + tell process frontAppName + tell (1st window whose value of attribute \"AXMain\" is true) + set windowTitle to value of attribute \"AXTitle\" + end tell + end tell + end tell + + tell application frontAppName + get bounds of front window + end tell'"; return false; } #endif