Use SSE/veclib/whatever for AudioBuffer::accumulate_from
[ardour.git] / libs / gtkmm2ext / tearoff.cc
index 6e8111152fbc40ce8dba18f4744f801668411f56..92bde5541e510f778650dbe3b22502950601ec10 100644 (file)
@@ -51,7 +51,7 @@ TearOff::TearOff (Widget& c, bool allow_resize)
        
        VBox* box1;
        box1 = manage (new VBox);
-       box1->pack_start (close_event_box, false, false, 5);
+       box1->pack_start (close_event_box, false, false, 2);
        
        window_box.pack_end (*box1, false, false, 2);
        own_window.add (window_box);
@@ -67,7 +67,7 @@ TearOff::TearOff (Widget& c, bool allow_resize)
 
        VBox* box2;
        box2 = manage (new VBox);
-       box2->pack_start (tearoff_event_box, false, false, 5);
+       box2->pack_start (tearoff_event_box, false, false, 2);
 
        pack_start (contents);
        pack_start (*box2, false, false, 2);
@@ -127,7 +127,7 @@ TearOff::close_click (GdkEventButton* ev)
 gint
 TearOff::window_button_press (GdkEventButton* ev)
 {
-       if (dragging) {
+       if (dragging || ev->button != 1) {
                dragging = false;
                own_window.remove_modal_grab();
                return true;
@@ -172,6 +172,12 @@ TearOff::window_motion (GdkEventMotion* ev)
                return true;
        }
 
+       if (!(ev->state & GDK_BUTTON1_MASK)) {
+               dragging = false;
+               own_window.remove_modal_grab();
+               return true;
+       }
+
        x_delta = ev->x_root - drag_x;
        y_delta = ev->y_root - drag_y;