Reputation: 592
I want to simulate a Windows-Snap feature for my application for Linux working under multiple-monitor setups and virtual-desktop setups. Why? I just do, for kicks. If it comes down to it I can use some native C++ code in Linux to achieve this also, and link to it with JNI.
Goal:
Problems:
Code:
This code successfully detects which physical monitor the window is on, but it does not work with virtual desktops. I did not add any snapping code here, this is for monitor detection only. In case you want to have a look: (use space and enter to swap monitors)
The code showed me the same GraphicsDevice when changing virtual desktop. I'm running Lubuntu x64 15.10 and running Java x64 version 8u25.
Upvotes: 2
Views: 204