Move Fl_X::make_fullscreen() for WIN32 platform to Fl_WinAPI_Window_Driver:: make_fullscreen().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11660 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
1e060f6408
commit
24487a719f
@ -54,11 +54,9 @@ public:
|
|||||||
Fl_Region region;
|
Fl_Region region;
|
||||||
Fl_X *next;
|
Fl_X *next;
|
||||||
HDC private_dc; // used for OpenGL
|
HDC private_dc; // used for OpenGL
|
||||||
HDC saved_hdc; // saves the handle of the DC currently loaded
|
|
||||||
// static variables, static functions and member functions
|
// static variables, static functions and member functions
|
||||||
static Fl_X* first;
|
static Fl_X* first;
|
||||||
static Fl_X* i(const Fl_Window* w) {return (Fl_X*)w->i;}
|
static Fl_X* i(const Fl_Window* w) {return (Fl_X*)w->i;}
|
||||||
void make_fullscreen(int X, int Y, int W, int H);
|
|
||||||
};
|
};
|
||||||
extern FL_EXPORT UINT fl_wake_msg;
|
extern FL_EXPORT UINT fl_wake_msg;
|
||||||
extern FL_EXPORT char fl_override_redirect; // hack into Fl_Window::make_xid()
|
extern FL_EXPORT char fl_override_redirect; // hack into Fl_Window::make_xid()
|
||||||
|
@ -1842,7 +1842,7 @@ Fl_X* Fl_WinAPI_Window_Driver::makeWindow() {
|
|||||||
monitor the window was placed on. */
|
monitor the window was placed on. */
|
||||||
RECT rect;
|
RECT rect;
|
||||||
GetWindowRect(x->xid, &rect);
|
GetWindowRect(x->xid, &rect);
|
||||||
x->make_fullscreen(rect.left, rect.top,
|
make_fullscreen(rect.left, rect.top,
|
||||||
rect.right - rect.left, rect.bottom - rect.top);
|
rect.right - rect.left, rect.bottom - rect.top);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ public:
|
|||||||
int custom_cursor;
|
int custom_cursor;
|
||||||
void set_minmax(LPMINMAXINFO minmax);
|
void set_minmax(LPMINMAXINFO minmax);
|
||||||
int fake_X_wm(int &X, int &Y, int &bt,int &bx,int &by);
|
int fake_X_wm(int &X, int &Y, int &bt,int &bx,int &by);
|
||||||
|
void make_fullscreen(int X, int Y, int W, int H);
|
||||||
// --- window data
|
// --- window data
|
||||||
virtual int decorated_w();
|
virtual int decorated_w();
|
||||||
virtual int decorated_h();
|
virtual int decorated_h();
|
||||||
|
@ -478,14 +478,15 @@ void Fl_WinAPI_Window_Driver::unmap() {
|
|||||||
|
|
||||||
#if !defined(FL_DOXYGEN) // FIXME - silence Doxygen warning
|
#if !defined(FL_DOXYGEN) // FIXME - silence Doxygen warning
|
||||||
|
|
||||||
void Fl_X::make_fullscreen(int X, int Y, int W, int H) {
|
void Fl_WinAPI_Window_Driver::make_fullscreen(int X, int Y, int W, int H) {
|
||||||
|
Fl_Window *w = pWindow;
|
||||||
int top, bottom, left, right;
|
int top, bottom, left, right;
|
||||||
int sx, sy, sw, sh;
|
int sx, sy, sw, sh;
|
||||||
|
|
||||||
top = w->fullscreen_screen_top;
|
top = fullscreen_screen_top();
|
||||||
bottom = w->fullscreen_screen_bottom;
|
bottom = fullscreen_screen_bottom();
|
||||||
left = w->fullscreen_screen_left;
|
left = fullscreen_screen_left();
|
||||||
right = w->fullscreen_screen_right;
|
right = fullscreen_screen_right();
|
||||||
|
|
||||||
if ((top < 0) || (bottom < 0) || (left < 0) || (right < 0)) {
|
if ((top < 0) || (bottom < 0) || (left < 0) || (right < 0)) {
|
||||||
top = Fl::screen_num(X, Y, W, H);
|
top = Fl::screen_num(X, Y, W, H);
|
||||||
@ -503,12 +504,12 @@ void Fl_X::make_fullscreen(int X, int Y, int W, int H) {
|
|||||||
Fl::screen_xywh(sx, sy, sw, sh, right);
|
Fl::screen_xywh(sx, sy, sw, sh, right);
|
||||||
W = sx + sw - X;
|
W = sx + sw - X;
|
||||||
|
|
||||||
DWORD flags = GetWindowLong(xid, GWL_STYLE);
|
DWORD flags = GetWindowLong(fl_xid(w), GWL_STYLE);
|
||||||
flags = flags & ~(WS_THICKFRAME|WS_CAPTION);
|
flags = flags & ~(WS_THICKFRAME|WS_CAPTION);
|
||||||
SetWindowLong(xid, GWL_STYLE, flags);
|
SetWindowLong(fl_xid(w), GWL_STYLE, flags);
|
||||||
|
|
||||||
// SWP_NOSENDCHANGING is so that we can override size limits
|
// SWP_NOSENDCHANGING is so that we can override size limits
|
||||||
SetWindowPos(xid, HWND_TOP, X, Y, W, H, SWP_NOSENDCHANGING | SWP_FRAMECHANGED);
|
SetWindowPos(fl_xid(w), HWND_TOP, X, Y, W, H, SWP_NOSENDCHANGING | SWP_FRAMECHANGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // !defined(FL_DOXYGEN) // FIXME - silence Doxygen warning
|
#endif // !defined(FL_DOXYGEN) // FIXME - silence Doxygen warning
|
||||||
@ -516,7 +517,7 @@ void Fl_X::make_fullscreen(int X, int Y, int W, int H) {
|
|||||||
|
|
||||||
void Fl_WinAPI_Window_Driver::fullscreen_on() {
|
void Fl_WinAPI_Window_Driver::fullscreen_on() {
|
||||||
pWindow->_set_fullscreen();
|
pWindow->_set_fullscreen();
|
||||||
Fl_X::i(pWindow)->make_fullscreen(x(), y(), w(), h());
|
make_fullscreen(x(), y(), w(), h());
|
||||||
Fl::handle(FL_FULLSCREEN, pWindow);
|
Fl::handle(FL_FULLSCREEN, pWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user