Matthias Melcher schrieb:
>
> On 02.05.2012, at 14:27, Edzard Egberts wrote:
>> Is it a known problem, that offscreen drawing doesn't work for
>> both screens of dual screen systems? I'm using Fedora 14, Kernel
>> 2.6.35.14, GNOME 2.32.0
>
> No. I hear this for the first time. I wonder if this is related to
> the FLTK screen_xywh() function calls, or if this is some feature of
> the underlying OS. If you have a few minutes, could you try to set a
> breakpoint in the screen_xywh functions and the retrieve the snapshop
> again?

It's not so easy, does it work for you, to test the functions? I called 
them inside of fl_offscreen and all looks okay. This is my example code, 
followed by output:

virtual void draw()
{
Fl_Window::draw();              // draws window on screen
cout << "count " << Fl::screen_count() << endl;
int sx, sy, sw, sh;
Fl::screen_xywh(sx, sy, sw, sh);
cout << "onscreen " << sx << ' ' << sy << ' ' << sw << ' ' << sh << endl;
Fl_Offscreen OF=  fl_create_offscreen(1000, 1000);
fl_begin_offscreen(OF);
Fl_Window::draw();              // draws window off screen
Fl::screen_xywh(sx, sy, sw, sh);
cout << "offscreen " << sx << ' ' << sy << ' ' << sw << ' ' << sh << endl;
Fl::screen_xywh(sx, sy, sw, sh, x(), y());
cout << "position " << sx << ' ' << sy << ' ' << sw << ' ' << sh << endl;
Fl::screen_xywh(sx, sy, sw, sh, x(), y(), w(), h());
cout << "rectangle " << sx << ' ' << sy << ' ' << sw << ' ' << sh << endl;
Fl::screen_xywh(sx, sy, sw, sh);
cout << "onscreen " << sx << ' ' << sy << ' ' << sw << ' ' << sh << endl;
Fl::screen_xywh(sx, sy, sw, sh, 0);
cout << "screen 0 " << sx << ' ' << sy << ' ' << sw << ' ' << sh << endl;
Fl::screen_xywh(sx, sy, sw, sh, 1);
cout << "screen 1 " << sx << ' ' << sy << ' ' << sw << ' ' << sh << endl;
cout << x() << ' ' << y() << endl;
fl_end_offscreen();
:

count 2
onscreen 1920 0 1920 1080
offscreen 1920 0 1920 1080
position 1920 0 1920 1080
rectangle 1920 0 1920 1080
onscreen 1920 0 1920 1080
screen 0 0 0 1920 1080
screen 1 1920 0 1920 1080
2322 197
No Image!

Two screens are right and there is no difference from on-screen to 
off-screen. Also the "within" functions are okay - all functions 
recognise, that window is on second screen. So when there is an error 
related to screen_xywh() it might be an error of not regarding the 
x-offset when calculating the whole screen area (or clipping something).
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to