Re: [9] Review request for 8165705: Robot.createScreenCapture produces black screenshot on Oracle Linux 7.1

2017-01-09 Thread Alexander Zvegintsev

Sure, updated in place.

Thanks,

Alexander.

On 01/09/2017 06:09 PM, Sergey Bylokhov wrote:

Looks fine.
But it seems that this field can be removed?
private static boolean isGtkSupported =false;
After the fix for JDK-8150954 this field is not used.



Hello,

please review the fix

http://cr.openjdk.java.net/~azvegint/jdk/9/8165705/00/ 



for the issue

https://bugs.openjdk.java.net/browse/JDK-8165705

Gtk is now default option for taking screenshots with Robot.

--
Thanks,
Alexander.







Re: OS X fullscreen window and dock

2017-01-09 Thread Michael Hall
> On Jan 8, 2017, at 9:04 AM, Michael Hall  wrote:
> 
> Stack overflow or someplace like that might be better for this sort of thing, 
> feel free to point that out if so. 
> But what is the best way to get a fullscreen window, less screen offsets with 
> a hidden dock?  While still accounting for the possible dock. I generally 
> like to have my dock hidden but pop up when needed. That space at the bottom 
> of the screen is valuable real estate. However, this can occasionally be a 
> nuisance if I want to actually get to something with the mouse at the very 
> bottom of the screen and it keeps popping up the dock in the way. 
> I am currently increasing the size of the main window of one of my 
> application’s. Going for as big as I can get it sort of full screen, 
> hopefully less insets for the dock. I can’t seem to get this. 
> For example using this…
> 
> Insets insets = 
> this.getToolkit().getScreenInsets(this.getGraphicsConfiguration());


I looked at this a little more to see if there isn't some way it should work as 
I’m thinking it should.
Speaking of Stackoverflow, I found this…

https://stackoverflow.com/questions/4982656/programmatically-get-screen-size-in-mac-os-x
 


This pretty much seems to follow what java is doing in CGraphicsDevice.m 
Java_sun_awt_CGraphicsDevice_nativeGetScreenInsets

where it appears to determine the difference between the screen size and the 
visible screen size.

someone in the Stackoverflow post indicates that...

"visibleFrame excludes the region occupied by the Dock or (when the Dock is 
hidden) the show-Dock trigger region, plus the menu bar.”

I think my testing showed that this is wrong, the ‘show-Dock trigger region’ is 
not excluded when the dock is hidden by user preference. 
Whether they are mistaken or this is a bug for OS X Yosemite I don’t know. 

I guess it would not be a java bug either way.

I will simply go for a JFrame that’s height is some arbitrary distance from the 
screen bottom if the dock appears to be hidden. That is, if the bottom inset it 
set to 4.

Thanks,

Michael Hall