diff options
| author | Manolo Gouy <Manolo> | 2016-03-23 14:36:58 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-03-23 14:36:58 +0000 |
| commit | affdcdb525b3a606115b3a6444f0ab7dcc4b48ac (patch) | |
| tree | 8ea7b48838875022aae56edd038910399b517fd7 /src/Fl_win32.cxx | |
| parent | 979740ce91525cc301a9173731d6aaf3004a6c88 (diff) | |
Rewrite Fl_Window::fullscreen_x() under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11407 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_win32.cxx')
| -rw-r--r-- | src/Fl_win32.cxx | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 70b382e3a..a2940940b 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1606,80 +1606,6 @@ void Fl_WinAPI_Window_Driver::resize(int X,int Y,int W,int H) { } } -void Fl_X::make_fullscreen(int X, int Y, int W, int H) { - int top, bottom, left, right; - int sx, sy, sw, sh; - - 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(X, Y, 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; - - DWORD flags = GetWindowLong(xid, GWL_STYLE); - flags = flags & ~(WS_THICKFRAME|WS_CAPTION); - SetWindowLong(xid, GWL_STYLE, flags); - - // SWP_NOSENDCHANGING is so that we can override size limits - SetWindowPos(xid, HWND_TOP, X, Y, W, H, SWP_NOSENDCHANGING | SWP_FRAMECHANGED); -} - -void Fl_Window::fullscreen_x() { - _set_fullscreen(); - i->make_fullscreen(x(), y(), w(), h()); - Fl::handle(FL_FULLSCREEN, this); -} - -void Fl_Window::fullscreen_off_x(int X, int Y, int W, int H) { - _clear_fullscreen(); - DWORD style = GetWindowLong(fl_xid(this), GWL_STYLE); - // Remove the xid temporarily so that Fl_X::fake_X_wm() behaves like it - // does in Fl_X::make(). - HWND xid = fl_xid(this); - Fl_X::i(this)->xid = NULL; - int wx, wy, bt, bx, by; - switch (Fl_X::fake_X_wm(this, wx, wy, bt, bx, by)) { - case 0: - break; - case 1: - style |= WS_CAPTION; - break; - case 2: - if (border()) { - style |= WS_THICKFRAME | WS_CAPTION; - } - break; - } - Fl_X::i(this)->xid = xid; - // Adjust for decorations (but not if that puts the decorations - // outside the screen) - if ((X != x()) || (Y != y())) { - X -= bx; - Y -= by+bt; - } - W += bx*2; - H += by*2+bt; - SetWindowLong(fl_xid(this), GWL_STYLE, style); - SetWindowPos(fl_xid(this), 0, X, Y, W, H, - SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED); - Fl::handle(FL_FULLSCREEN, this); -} - //////////////////////////////////////////////////////////////// |
