From c538fc48e16845e793ba92434ec85af370f7ed7e Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Tue, 28 Jun 2016 22:12:04 +0200 Subject: [PATCH] changed osascript (not done) --- switcher.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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