From 0cfc2554c695bd472ce9e579ddcf1240f4fa155a Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 11 Jun 2014 09:10:53 +0000 Subject: Support for full screen over multiple monitors. The API follows that of EWMH, which gives you a good control over which monitors to use. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10189 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'src/Fl_cocoa.mm') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index b341acd20..a60b61a46 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2394,9 +2394,32 @@ void Fl_X::make(Fl_Window* w) NSRect crect; if (w->fullscreen_active()) { - int sx, sy, sw, sh; - Fl::screen_xywh(sx, sy, sw, sh, w->x(), w->y(), w->w(), w->h()); - w->resize(sx, sy, sw, sh); + int top, bottom, left, right; + int sx, sy, sw, sh, X, Y, W, H; + + top = w->fullscreen_screen_top; + bottom = w->fullscreen_screen_bottom; + left = w->fullscreen_screen_left; + right = w->fullscreen_screen_right; + + if ((top < 0) || (bottom < 0) || (left < 0) || (right < 0)) { + top = Fl::screen_num(w->x(), w->y(), w->w(), w->h()); + bottom = top; + left = top; + right = top; + } + + Fl::screen_xywh(sx, sy, sw, sh, top); + Y = sy; + Fl::screen_xywh(sx, sy, sw, sh, bottom); + H = sy + sh - Y; + Fl::screen_xywh(sx, sy, sw, sh, left); + X = sx; + Fl::screen_xywh(sx, sy, sw, sh, right); + W = sx + sw - X; + + w->resize(X, Y, W, H); + winstyle = NSBorderlessWindowMask; winlevel = NSStatusWindowLevel; } -- cgit v1.2.3