Skip to content

Commit

Permalink
Revert selection shot change to make selections across multiple monit…
Browse files Browse the repository at this point in the history
…ors work again, to be fixed again at a later date.
  • Loading branch information
nikkiii committed Jan 23, 2014
1 parent 667fea9 commit d7e6dbc
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions src/org/sleeksnap/ScreenSnapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.awt.AWTException;
import java.awt.MenuItem;
import java.awt.PopupMenu;
import java.awt.Rectangle;
import java.awt.SystemTray;
import java.awt.Toolkit;
import java.awt.TrayIcon;
Expand Down Expand Up @@ -227,7 +226,7 @@ public static void main(String[] args) {
/**
* The selection window instances
*/
private SelectionWindow[] windows = null;
private SelectionWindow window = null;

/**
* Defines whether the options panel is open
Expand Down Expand Up @@ -386,10 +385,7 @@ public void active() {
* Clear the screenshot selection window
*/
public void clearWindow() {
for(int i = 0; i < windows.length; i++) {
windows[i] = null;
}
windows = null;
window = null;
}

/**
Expand Down Expand Up @@ -436,19 +432,14 @@ public void clipboard() {
* Perform a screenshot crop action
*/
public void crop() {
if (windows != null) {
if (window != null) {
return;
}
Rectangle[] screens = DisplayUtil.getAllScreenBounds();

windows = new SelectionWindow[screens.length];

for(int i = 0; i < screens.length; i++) {
SelectionWindow window = windows[i] = new SelectionWindow(this, screens[i]);
window.pack();
window.setAlwaysOnTop(true);
window.setVisible(true);
}
window = new SelectionWindow(this, DisplayUtil.getRealScreenSize());
window.pack();
window.setAlwaysOnTop(true);
window.setVisible(true);
}

/**
Expand Down

0 comments on commit d7e6dbc

Please sign in to comment.