summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleo1999-12-22 14:00:36 +0000
committerleo1999-12-22 14:00:36 +0000
commit6338a7b1108e6e3e5ec3768172d1bf03cbbfc3b2 (patch)
tree526dc91f81edf33b11632172ad6c04eaab39fad9
parentc2804ce4004c57f060e7c7ab55d27a08d5a9b508 (diff)
Small bug fixes
git-svn-id: http://svn.leocad.org/trunk@40 c7d43263-9d01-0410-8a33-9dba5d9f93d6
-rw-r--r--linux/main.cpp8
-rw-r--r--linux/system.cpp6
-rw-r--r--linux/system.h5
3 files changed, 11 insertions, 8 deletions
diff --git a/linux/main.cpp b/linux/main.cpp
index c252801..74a7bac 100644
--- a/linux/main.cpp
+++ b/linux/main.cpp
@@ -69,7 +69,11 @@ void OnCommand(GtkWidget* widget, gpointer data)
switch (id)
{
- case ID_FILE_EXIT: {
+ case ID_FILE_EXIT:
+ {
+ if (!project->SaveModified())
+ break;
+
gtk_main_quit();
} break;
@@ -190,8 +194,6 @@ static gint draw_view(GtkWidget *widget, GdkEventExpose *event)
return TRUE;
project->Render(false);
- // TODO: call SystemSwap from Render()
- gtk_gl_area_swapbuffers(GTK_GL_AREA(widget));
return TRUE;
}
diff --git a/linux/system.cpp b/linux/system.cpp
index 8aa21ce..8849b5c 100644
--- a/linux/system.cpp
+++ b/linux/system.cpp
@@ -636,4 +636,8 @@ void SystemReleaseMouse()
{
}
-
+void SystemSwapBuffers()
+{
+ if (drawing_area)
+ gtk_gl_area_swapbuffers (GTK_GL_AREA(drawing_area));
+}
diff --git a/linux/system.h b/linux/system.h
index 2f53e3e..31c5251 100644
--- a/linux/system.h
+++ b/linux/system.h
@@ -89,10 +89,7 @@ inline long SystemGetTicks()
return 0;//GetTickCount();
}
-inline void SystemSwapBuffers()
-{
- // SwapBuffers(wglGetCurrentDC());
-}
+void SystemSwapBuffers();
inline bool IsKeyDown(int key)
{