Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SWT Shell location on maximize  RSS feed

 
Jay Damon
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently discovered while testing that, when an SWT Shell is maximized, e.g. via setMaximize, the new location reported always appears to be off the display, e.g. the Point object returned will be something like Point {-5,-5}. This is true regardless of whether the location is retrieved via getLocation or getBounds. How far off the screen the location is seems to be dependent upon the screen resolution. I have seen values from Point {-4,-4} to Point {-13,-13}.

I would have expected the location (after maximize) to always be Point {0,0}. Why is it not?

I have tested this with different machines, different versions of Windows (7 & 8), and different versions of SWT. All seem to behave this way.

Can anyone offer an explanation?

Thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!