Comments (3)
Suggested fix:
diff -up fltk-1.3.5/src/Fl_cocoa.mm.multihead fltk-1.3.5/src/Fl_cocoa.mm
--- fltk-1.3.5/src/Fl_cocoa.mm.multihead 2020-01-21 13:46:18.640982691 +0100
+++ fltk-1.3.5/src/Fl_cocoa.mm 2020-01-21 13:49:00.267671569 +0100
@@ -3100,8 +3100,31 @@ void Fl_Window::fullscreen_x() {
[i->xid setStyleMask:NSBorderlessWindowMask]; //10.6
#endif
[i->xid setLevel:NSStatusWindowLevel];
- int X,Y,W,H;
- Fl::screen_xywh(X, Y, W, H, x(), y(), w(), h());
+
+ int top, bottom, left, right;
+ int sx, sy, sw, sh, X, Y, W, H;
+
+ top = fullscreen_screen_top;
+ bottom = fullscreen_screen_bottom;
+ left = fullscreen_screen_left;
+ right = 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;
+
resize(X, Y, W, H);
}
Fl::handle(FL_FULLSCREEN, this);
This is for 1.3.5 but the principle should apply to master
as well.
from fltk.
Thanks for the patch.
Committed to the 1.4 branch. [Branch 1.3 is no longer updated].
Please, close issue if you confirm it's OK.
from fltk.
I'm afraid I don't have a test setup for 1.4. But your commit looks fine, so let's just close this issue. :)
from fltk.
Related Issues (20)
- Detected a memory leak. HOT 1
- FLTK 1.3: missing FL_EXPORT in x.H HOT 4
- FLTK 1.4 Bug on Linux: Window scaling makes window lose resizable status if resizable_ is NULL HOT 2
- FLTK 1.4 Mac Bug: Fullscreen window loses sys menu bar and (un)fullscreen button if 2nd window is opened HOT 5
- FLTK 1.4 Mac Bug: Scaling window up/down also scales X/Y position on secondary displays only HOT 2
- Filechooser preview of XML file shows it as a corrupt image HOT 7
- FLTK 1.4 Mac Bug: Window scaling doesn't work correctly for subwindows HOT 4
- Fl_Terminal loses lines at bottom of display when resizing HOT 6
- Fl_Terminal: initial horizontal scrollbar displayed HOT 10
- test/unittest "Scrollbar Size" test needs to include exercising Fl_Terminal HOT 1
- FLTK compile error with recent libdecor update HOT 1
- memory leak in Fl_X11_Screen_Driver.cxx HOT 4
- FLTK on NetBSD very slow on X11 with Unicode locale HOT 5
- Support for HP-UX HOT 20
- Memory leak in Fl_Xlib_Graphics_Driver_font_xft.cxx HOT 6
- Support for old compilers (gcc 2.x) HOT 7
- Build test programs only on request HOT 3
- 1.5 tooltips and menu help callbacks. HOT 5
- Support for AIX HOT 12
- Fix roundf() and nsvg__roundf() usage in nanosvg
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fltk.