summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Window.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-04-19 17:34:15 +0000
committerManolo Gouy <Manolo>2016-04-19 17:34:15 +0000
commit4aa388d4ffb2f62986fb5dc7b06325a4dd0cf56a (patch)
treee525d0372b2fbdbf17556d37ee1ab715b67a4288 /src/Fl_Gl_Window.cxx
parent9f78323574ce8fbbcbf491980fdc9629b83a018a (diff)
Add static Fl_XXX_Window_Driver *driver(Fl_Window*) to get the platform-specific driver of a window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11663 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Window.cxx')
-rw-r--r--src/Fl_Gl_Window.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index acd790e7b..241221698 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -114,7 +114,7 @@ void Fl_Gl_Window::show() {
int Fl_Gl_Window::pixels_per_unit()
{
return (fl_mac_os_version >= 100700 && Fl::use_high_res_GL() && Fl_X::i(this) &&
- ((Fl_Cocoa_Window_Driver*)driver())->mapped_to_retina()) ? 2 : 1;
+ Fl_Cocoa_Window_Driver::driver(this)->mapped_to_retina()) ? 2 : 1;
}
#endif // __APPLE__ // PORTME: platform OpenGL management
@@ -198,7 +198,7 @@ void Fl_Gl_Window::make_current() {
// printf("make_current: context_=%p\n", context_);
#if defined(__APPLE__) // PORTME: platform OpenGL management
// detect if the window was moved between low and high resolution displays
- Fl_Cocoa_Window_Driver *d = (Fl_Cocoa_Window_Driver*)driver();
+ Fl_Cocoa_Window_Driver *d = Fl_Cocoa_Window_Driver::driver(this);
if (d->changed_resolution()){
d->changed_resolution(false);
invalidate();
@@ -443,7 +443,7 @@ void Fl_Gl_Window::resize(int X,int Y,int W,int H) {
#ifdef __APPLE__ // PORTME: platform OpenGL management
Fl_X *flx = Fl_X::i(this);
- Fl_Cocoa_Window_Driver *d = (Fl_Cocoa_Window_Driver*)driver();
+ Fl_Cocoa_Window_Driver *d = Fl_Cocoa_Window_Driver::driver(this);
if (flx && d->in_windowDidResize()) Fl_Cocoa_Screen_Driver::GLcontext_update(context_);
#endif