summaryrefslogtreecommitdiffstats
path: root/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'window.cpp')
-rw-r--r--window.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/window.cpp b/window.cpp
index 881a96f..1deff6d 100644
--- a/window.cpp
+++ b/window.cpp
@@ -124,9 +124,12 @@ static gboolean scrollEvent(GtkWidget *widget, GdkEventScroll *event, gpointer u
switch(event->direction) {
case GDK_SCROLL_UP:
zoomIn(1.1f, x, y);
- break;
+ return TRUE;
case GDK_SCROLL_DOWN:
zoomOut(1.1f, x, y);
+ return TRUE;
+ default:
+ return FALSE;
}
}
@@ -156,9 +159,11 @@ static gboolean buttonEvent(GtkWidget *widget, GdkEventButton *event, gpointer u
gtk_widget_queue_draw(drawingArea);
}
+
+ return TRUE;
+ default:
+ return FALSE;
}
-
- return FALSE;
}
gboolean crossingNotifyEvent(GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) {
@@ -170,13 +175,18 @@ gboolean crossingNotifyEvent(GtkWidget *widget, GdkEventCrossing *event, gpointe
setHoveredVertex(&v);
- break;
+ gtk_widget_queue_draw(drawingArea);
+
+ return TRUE;
case GDK_LEAVE_NOTIFY:
setHoveredVertex(NULL);
+
+ gtk_widget_queue_draw(drawingArea);
+
+ return TRUE;
+ default:
+ return FALSE;
}
-
-
- gtk_widget_queue_draw(drawingArea);
}
gboolean motionNotifyEvent(GtkWidget *widget, GdkEventMotion *event, gpointer user_data) {
@@ -189,6 +199,8 @@ gboolean motionNotifyEvent(GtkWidget *widget, GdkEventMotion *event, gpointer us
if(getHoveredRoom() != last || getEditMode() == EDIT_MODE_ADD)
gtk_widget_queue_draw(drawingArea);
+
+ return TRUE;
}
static void destroy(GtkWidget *widget, gpointer data) {
@@ -290,7 +302,6 @@ static GtkWidget* createSidebar() {
GtkWidget* createMainWindow(GdkGLConfig *glconfig) {
GtkWidget *window, *hPaned, *vbox, *table, *vScroll, *hScroll, *sidebar;
- GdkColor color = {0, 0, 0, 0};
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);