FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Locating Shell on the bottom right corner (notify window)

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT
View previous topic :: View next topic  
Author Message
WasserDragoon



Joined: 29 Sep 2007
Posts: 23
Location: Germany

PostPosted: Wed Apr 23, 2008 6:16 am    Post subject: Locating Shell on the bottom right corner (notify window) Reply with quote

Hi,
im trying to locate my shell on the bottom right corner of my screen.
The problem: it works, but it overlaps my taskbar.
Here's the code:
http://paste.dprogramming.com/dprv24a9

And thats a screenshot how it looks:


And here how it should look:


Hope anyone can help me.
Thanks,
WasserDragoon.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
doob



Joined: 06 Jan 2007
Posts: 367

PostPosted: Wed Apr 23, 2008 9:33 am    Post subject: Reply with quote

If you change
Code:
Rectangle screen = display.getBounds();
to
Code:
Rectangle screen = display.getClientArea();
it works on windows but still not on gtk. I don't know how it supposed to work but getClientArea is inherited from Device and on windows in Display it's overridden but not on gtk. getClientArea in Device returns getBounds. On gtk there's a method in Display, getWorkArea, that maybe works but it doesn't exist on windows and in the online API documentation. Since this is D it can easily be fixed with a version statement if getWorkArea works.

This could also work
Code:
Monitor monitor = display.getPrimaryMonitor;
monitor.getClientArea;

That works at least on windows
Back to top
View user's profile Send private message
WasserDragoon



Joined: 29 Sep 2007
Posts: 23
Location: Germany

PostPosted: Mon Apr 28, 2008 3:39 am    Post subject: Reply with quote

ok great i changed to:
Code:
version(Windows)
{
    Rectangle screen = shell.getDisplay().getClientArea();
}
else
{
    Rectangle screen = shell.getDisplay().getWorkArea();
}


works perfect Wink
thanks
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Tue May 06, 2008 5:05 pm    Post subject: Reply with quote

I think the problem here is, on linux the toolbars can be on each monitor on each side. So the overall ClientArea is probably not really a rect.

display.getMonitors() returns all Monitors and they have also a getClientArea(). This should return the correct values per Monitor.

Note: Be carefull to fully qualify Monitor, because it would conflict with that one from object.Object

Note: Display.getWorkArea is not public API, so it might go away or change behaviour in future versions.

Note: Please use the dwt newsgroup instead of this forum.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group