summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-07-10 23:53:20 +0200
committerPaul Buetow <paul@buetow.org>2013-07-10 23:53:20 +0200
commitbc120edb60bcf7897723bd43e2f1e7349ca6619f (patch)
tree1bbd96ef6091c977f6464f59a707bf3c1c28a923
parent02d32249234d6e91aae9b8247be8a552ad9d8336 (diff)
it"s now possible to resize the window via mouse
-rw-r--r--lib/Loadbars/Main.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Loadbars/Main.pm b/lib/Loadbars/Main.pm
index a603434..2f8e200 100644
--- a/lib/Loadbars/Main.pm
+++ b/lib/Loadbars/Main.pm
@@ -466,6 +466,14 @@ sub loop ($@) {
# While there are events to poll, poll them all!
while ( SDL::Events::poll_event($event) ) {
+ # Videoresize
+ if ($event->type() == 16) {
+ $newsize{width} = $event->resize_w;
+ $newsize{height} = $event->resize_h;
+ $resize_window = 1;
+ }
+
+ # Not a key
next if $event->type() != 2;
my $key_sym = $event->key_sym();