marcisme / sketch-preview

Sketch plugin to preview mockups in Skala Preview
MIT License
610 stars 37 forks source link

Switches to Skala Preview on every ⌘P #16

Closed davidkatz closed 9 years ago

davidkatz commented 9 years ago

Whenever I use this (wonderful) plugin, the active app on my mac switches to Skala Preview. This makes it hard to quickly look at design iterations while working. If there's any way to send an artboard to Skala without taking me out of Sketch, that'd be great.

areohbe commented 9 years ago

If you minimize the Skala window and then preview your artboard, it will still change the active window and you'll need to click/tap into the the Sketch window but it will prevent the Skala window from being displayed over Sketch.

marcisme commented 9 years ago

I've tried to have the plugin switch back to Sketch after opening the preview image, but I've never been able to get it to work right. I'll take a look and see if anything has changed.

marcisme commented 9 years ago

I thought I'd tried this change in the past, but it seems to work now regardless. Give this branch a try, and let me know if it works for you. Note Skala Preview will still come to the foreground the first time it's launched, but it shouldn't activate after the initial preview.

marcisme commented 9 years ago

This should be fixed in v0.6.1. Let me know if it doesn't work for you.

ansverch commented 9 years ago

The problem is back for me. Active app switches to Skala Preview every time I use plugin with ⌘P or via menu. Tested on master, beta, 0.6.1 and 0.6.0 — same results.

I used trial Sketch 3.3 before and everything was fine. Today I purchased updated Sketch v3.3.1 and met this problem.

Thanks for such a useful plugin!

marcisme commented 9 years ago

I tried to reproduce this, but I'm unable to. I'm using Sketch 3.3.1, OSX 10.10.3 and Skala Preview 1.6.0.

I'd double check Plugins -> Reveal Plugins Folder... to make sure only one copy of the plugin is installed, Maybe delete whatever's in there and install fresh, just to be sure.

If that still doesn't work, I'd be curious to know what happens if you run open -g -a 'Skala Preview' from the Terminal app. Terminal should remain the frontmost app, regardless of whether Skala Preview is already running or not. That's more or less the same thing the plugin does, so it may give some insight if this is an issue with the Finder itself.

ansverch commented 9 years ago

Thank you for you support.

I'm using Sketch 3.3.1, OSX 10.9.5 and Skala Preview 1.6.0. I just deleted all plugins, installed Sketch Preview from Sketch Toolbox — still having the same problem. I've tried to relaunch Sketch and Skala Preview, but that didn't help.

If Skala Preview is closed and I run open -g -a 'Skala Preview' from Terminal, Skala pops up before Terminal, but Terminal remain the frontmost app. If Skala is already running and I run that command again — nothing happens, Skala is not appearing if was behind other apps.

I am going to see how it works on another mac with OSX 10.10.3. Also, might be helpful, I didn't uninstall trial version before I purchased Sketch from MAS. All plugins were gone, so I installed them again via Sketch Toolbox. So, maybe I should try to completely reinstall Sketch. I will let you know about these results.

ansverch commented 9 years ago

I tried to uninstall these apps using third party tools then reboot and install from MAS — didn't help, problem remains.

Also tested on another mac with OSX 10.10.3 — everything is fine.

ansverch commented 9 years ago

options:NSWorkspaceLaunchAndHide solved my issue

marcisme commented 9 years ago

@ansverch Thanks for your work on this. I'm looking over the change now, and I'll comment in the PR thread if needed.