summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx6
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.h2
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx6
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.h2
-rw-r--r--src/drivers/X11/Fl_X11_Screen_Driver.cxx9
-rw-r--r--src/drivers/X11/Fl_X11_Screen_Driver.h2
6 files changed, 26 insertions, 1 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
index 704c3dc72..787a9967a 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
+++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.cxx
@@ -113,6 +113,12 @@ void Fl_Cocoa_Screen_Driver::beep(int type) {
}
+void Fl_Cocoa_Screen_Driver::flush() {
+ if (fl_gc)
+ CGContextFlush(fl_gc);
+}
+
+
//
// End of "$Id$".
//
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.h b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.h
index 4c5cf8a7e..00ee70c18 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.h
+++ b/src/drivers/Cocoa/Fl_Cocoa_Screen_Driver.h
@@ -57,6 +57,8 @@ public:
virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n);
// --- audible output
virtual void beep(int type);
+ // --- global events
+ virtual void flush();
};
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
index ddf9deaac..0569caca2 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
@@ -233,6 +233,12 @@ void Fl_WinAPI_Screen_Driver::beep(int type)
}
+void Fl_WinAPI_Screen_Driver::flush()
+{
+ GdiFlush();
+}
+
+
//
// End of "$Id$".
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.h b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.h
index f0f5c823c..14bd1ff2d 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.h
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.h
@@ -50,6 +50,8 @@ public:
virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n);
// --- audible output
virtual void beep(int type);
+ // --- global events
+ virtual void flush();
};
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.cxx b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
index 6a53f65f6..e98dc3413 100644
--- a/src/drivers/X11/Fl_X11_Screen_Driver.cxx
+++ b/src/drivers/X11/Fl_X11_Screen_Driver.cxx
@@ -187,7 +187,8 @@ void Fl_X11_Screen_Driver::screen_dpi(float &h, float &v, int n)
}
-void Fl_X11_Screen_Driver::beep(int type) {
+void Fl_X11_Screen_Driver::beep(int type)
+{
switch (type) {
case FL_BEEP_DEFAULT :
case FL_BEEP_ERROR :
@@ -202,6 +203,12 @@ void Fl_X11_Screen_Driver::beep(int type) {
}
+void Fl_X11_Screen_Driver::flush()
+{
+ if (fl_display)
+ XFlush(fl_display);
+}
+
//
// End of "$Id$".
diff --git a/src/drivers/X11/Fl_X11_Screen_Driver.h b/src/drivers/X11/Fl_X11_Screen_Driver.h
index 635e975dc..b699a9ac4 100644
--- a/src/drivers/X11/Fl_X11_Screen_Driver.h
+++ b/src/drivers/X11/Fl_X11_Screen_Driver.h
@@ -52,6 +52,8 @@ public:
virtual void screen_work_area(int &X, int &Y, int &W, int &H, int n);
// --- audible output
virtual void beep(int type);
+ // --- global events
+ virtual void flush() = 0;
};