Skip to content

Commit

Permalink
Move the window when clicking and dragging anywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed May 3, 2017
1 parent 54ebbaf commit fc2667d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ public class MainWindow : Gtk.Dialog {
var action_box = get_action_area () as Gtk.Box;
action_box.visible = false;

button_press_event.connect ((e) => {
if (e.button == Gdk.BUTTON_PRIMARY) {
begin_move_drag ((int) e.button, (int) e.x_root, (int) e.y_root, e.time);
return true;
}
return false;
});

focus_in_event.connect (() => {
weather_info.update ();
});
Expand Down

0 comments on commit fc2667d

Please sign in to comment.