Browse Source

Make sure we filter out any screens that aren't fully inside the new

framebuffer.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4945 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v1.2.90
Pierre Ossman 12 years ago
parent
commit
93d2d9272b
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      vncviewer/DesktopWindow.cxx

+ 8
- 0
vncviewer/DesktopWindow.cxx View File

int i; int i;
rdr::U32 id; rdr::U32 id;
int sx, sy, sw, sh; int sx, sy, sw, sh;
Rect fb_rect, screen_rect;


// In full screen we report all screens that are fully covered. // In full screen we report all screens that are fully covered.


fb_rect.setXYWH(x + , 0, width, height);

// If we can find a matching screen in the existing set, we use // If we can find a matching screen in the existing set, we use
// that, otherwise we create a brand new screen. // that, otherwise we create a brand new screen.
// //
for (i = 0;i < Fl::screen_count();i++) { for (i = 0;i < Fl::screen_count();i++) {
Fl::screen_xywh(sx, sy, sw, sh, i); Fl::screen_xywh(sx, sy, sw, sh, i);


// Check that the screen is fully inside the framebuffer
screen_rect.setXYWH(sx, sy, sw, sh);
if (!screen_rect.enclosed_by(fb_rect))
continue;

// Look for perfectly matching existing screen... // Look for perfectly matching existing screen...
for (iter = cc->cp.screenLayout.begin(); for (iter = cc->cp.screenLayout.begin();
iter != cc->cp.screenLayout.end(); ++iter) { iter != cc->cp.screenLayout.end(); ++iter) {

Loading…
Cancel
Save