Bug 1163 : Screen size not detected in Linux
Last modified: 2010-06-05 02:59




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P2
Severity:
normal

 

Reporter:
javiruiz
Assigned To:
fry

Attachment Type Created Size Actions
Source code with screen size text/plain 2009-02-19 16:15 52.03 KB

Description:   Opened: 2009-02-16 08:12
Hi,
I am learning Processing and I did a simple clock. Since I want it to work using all the screen
available I used screen.width and screen.height.

Well, it works in Mac (where I develop) and in Windows. But in Linux it only shows a tiny 100
x 100 screen.

Any help apreciated.

The code:

void setup() {

noCursor();

size(screen.width, screen.height); // adjust itself to the screen size

(...)

Thanks
Additional Comment #1 From fry 2009-02-18 05:31
That works fine on at least one of my Linux test machines (Ubuntu 8.04).

Is there something unique about your setup that could be causing problems?
(Old video drivers, etc.)

Is it possible that you have code before size()?

Try this single line sketch, what does it output?
println(screen.width + " " + screen.height);
Additional Comment #2 From javiruiz 2009-02-19 16:15
edit]
Source code with screen size
Additional Comment #3 From javiruiz 2009-02-19 16:18
Thanks for you help, Fry, and also for making Processing. ¡Es genial!
I'll try what you suggest ASAP.

(i attached the source code, because I think I forgot to do it last time).

Javier Ruiz
Tenerife (Spain)

>
>
>
> Additional Comment #1 From
>
> fry
> 2009-02-18 05:31
>
> <!--
> addReplyLink(1); //-->[reply]
>
>
>
>
> That works fine on at least one of my Linux test machines (Ubuntu 8.04).
>
> Is there something unique about your setup that could be causing problems?
> (Old video drivers, etc.)
>
> Is it possible that you have code before size()?
>
> Try this single line sketch, what does it output?
> println(screen.width + " " + screen.height);
>
>


Additional Comment #4 From fry 2010-06-05 02:59
i believe this has gone away in more recent java releases, or it's a
problem when using a java vm other than sun-java.