Home » Eclipse Projects » Standard Widget Toolkit (SWT) » display.getClientArea is incorrect (gtk)
display.getClientArea is incorrect (gtk) [message #483212] |
Mon, 31 August 2009 15:22 |
Olivier Cailloux Messages: 6 Registered: July 2009 |
Junior Member |
|
|
Dear list,
Please consider the following snippet.
---
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
public class GtkClientArea {
public static void main(final String[] args) {
final Display display = new Display();
final Rectangle clientArea = display.getClientArea();
System.out.println("Client area: " + clientArea.toString());
display.dispose();
}
}
---
On my system (debian lenny, gtk), it gives: "Client area: Rectangle {0,
0, 1280, 1024}". My screen is indeed 1280*1024, but I have (as is usual
in Linux) a top bar and a bottom task bar, meaning that this is not the
area which can be used by applications.
If in my app I try to create a shell and set its size to 1280*1024, when
opening it, I see it is automatically resized after opening to (about)
1280*974, I guess, by the windows manager.
So the method getClientArea does not seem to return the area my
application can use to display itself. Is it a bug?
Thank you.
Olivier
|
|
|
Re: display.getClientArea is incorrect (gtk) [message #483490 is a reply to message #483212] |
Tue, 01 September 2009 18:01 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
This is logged as https://bugs.eclipse.org/bugs/show_bug.cgi?id=33659 .
Grant
"Olivier Cailloux" <mlsmg@ulb.ac.be> wrote in message
news:h7gprc$nlr$1@build.eclipse.org...
> Dear list,
>
> Please consider the following snippet.
>
> ---
> import org.eclipse.swt.graphics.Rectangle;
> import org.eclipse.swt.widgets.Display;
>
> public class GtkClientArea {
> public static void main(final String[] args) {
> final Display display = new Display();
> final Rectangle clientArea = display.getClientArea();
> System.out.println("Client area: " + clientArea.toString());
> display.dispose();
> }
> }
> ---
>
> On my system (debian lenny, gtk), it gives: "Client area: Rectangle {0,
> 0, 1280, 1024}". My screen is indeed 1280*1024, but I have (as is usual
> in Linux) a top bar and a bottom task bar, meaning that this is not the
> area which can be used by applications.
>
> If in my app I try to create a shell and set its size to 1280*1024, when
> opening it, I see it is automatically resized after opening to (about)
> 1280*974, I guess, by the windows manager.
>
> So the method getClientArea does not seem to return the area my
> application can use to display itself. Is it a bug?
>
> Thank you.
> Olivier
|
|
|
Re: display.getClientArea is incorrect (gtk) [message #483660 is a reply to message #483490] |
Wed, 02 September 2009 13:54 |
Olivier Cailloux Messages: 6 Registered: July 2009 |
Junior Member |
|
|
Grant Gayed a écrit :
> This is logged as https://bugs.eclipse.org/bugs/show_bug.cgi?id=33659 .
Ooops. Being new at SWT, I didn't thought I would have found a real bug
but rather something I was not understanding correctly, so I did not
even bother to check there... My fault!
Thank you for your time.
Olivier
>
> Grant
>
>
> "Olivier Cailloux" <mlsmg@ulb.ac.be> wrote in message
> news:h7gprc$nlr$1@build.eclipse.org...
>> Dear list,
>>
>> Please consider the following snippet.
>>
>> ---
>> import org.eclipse.swt.graphics.Rectangle;
>> import org.eclipse.swt.widgets.Display;
>>
>> public class GtkClientArea {
>> public static void main(final String[] args) {
>> final Display display = new Display();
>> final Rectangle clientArea = display.getClientArea();
>> System.out.println("Client area: " + clientArea.toString());
>> display.dispose();
>> }
>> }
>> ---
>>
>> On my system (debian lenny, gtk), it gives: "Client area: Rectangle {0,
>> 0, 1280, 1024}". My screen is indeed 1280*1024, but I have (as is usual
>> in Linux) a top bar and a bottom task bar, meaning that this is not the
>> area which can be used by applications.
>>
>> If in my app I try to create a shell and set its size to 1280*1024, when
>> opening it, I see it is automatically resized after opening to (about)
>> 1280*974, I guess, by the windows manager.
>>
>> So the method getClientArea does not seem to return the area my
>> application can use to display itself. Is it a bug?
>>
>> Thank you.
>> Olivier
>
>
|
|
|
Goto Forum:
Current Time: Thu Apr 25 01:10:51 GMT 2024
Powered by FUDForum. Page generated in 0.03569 seconds
|