summaryrefslogtreecommitdiff
path: root/src/drivers/Quartz
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-10-12 21:05:27 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-10-12 21:05:38 +0200
commit0d8385a652441440d8fa2db15bd40d4d5cf4e734 (patch)
tree07001b71b6bd5940f300bc8fbdeca5af831a72f4 /src/drivers/Quartz
parent5830226aab4428e77e7aa4078e0f544aef92f326 (diff)
Simpler macOS implementation of capture of window titlebars.
Diffstat (limited to 'src/drivers/Quartz')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.H1
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx15
2 files changed, 0 insertions, 16 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.H b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.H
index e97304fe3..6aab63978 100644
--- a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.H
+++ b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.H
@@ -33,7 +33,6 @@ protected:
void set_current();
void translate(int x, int y);
void untranslate();
- virtual void draw_decorated_window(Fl_Window *win, int x_offset, int y_offset);
};
#endif /* Fl_Quartz_Copy_Surface_Driver_H */
diff --git a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx
index 5f3735567..4a913abfc 100644
--- a/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Copy_Surface_Driver.cxx
@@ -87,19 +87,4 @@ void Fl_Quartz_Copy_Surface_Driver::untranslate() {
CGContextRestoreGState(gc);
}
-void Fl_Quartz_Copy_Surface_Driver::draw_decorated_window(Fl_Window *win, int x_offset, int y_offset) {
- CALayer *layer = Fl_Cocoa_Window_Driver::driver(win)->get_titlebar_layer();
- if (!layer) {
- return Fl_Widget_Surface::draw_decorated_window(win, x_offset, y_offset);
- }
- CGContextSaveGState(gc);
- int bt = win->decorated_h() - win->h();
- CGContextTranslateCTM(gc, x_offset - 0.5, y_offset + bt - 0.5);
- float s = Fl::screen_scale(win->screen_num());
- CGContextScaleCTM(gc, 1/s, s >= 1 ? -1/s : -1);
- Fl_Cocoa_Window_Driver::driver(win)->draw_layer_to_context(layer, gc, win->w() * s, bt*s);
- CGContextRestoreGState(gc);
- draw(win, x_offset, y_offset + bt); // print the window inner part
-}
-
#endif // FL_CFG_GFX_QUARTZ