From 65d6eb551a8e45586ae5f60713b78c02f7d1ddc9 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Wed, 1 Aug 2012 13:59:43 +0200 Subject: [PATCH] Try harder to attract user attention on wxMAC. #575 --- lib/Slic3r/GUI.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm index 3b615659c..54a6aa243 100644 --- a/lib/Slic3r/GUI.pm +++ b/lib/Slic3r/GUI.pm @@ -11,7 +11,7 @@ use Slic3r::GUI::OptionsGroup; use Slic3r::GUI::SkeinPanel; use Slic3r::GUI::Tab; -use Wx 0.9901 qw(:bitmap :dialog :frame :icon :id :misc :systemsettings); +use Wx 0.9901 qw(:bitmap :dialog :frame :icon :id :misc :systemsettings :toplevelwindow); use Wx::Event qw(EVT_CLOSE EVT_MENU); use base 'Wx::App'; @@ -201,7 +201,9 @@ sub notify { my ($message) = @_; my $frame = $self->GetTopWindow; - $frame->RequestUserAttention unless ($frame->IsActive); + # try harder to attract user attention on OS X + $frame->RequestUserAttention(&Wx::wxMAC ? wxUSER_ATTENTION_ERROR : wxUSER_ATTENTION_INFO) + unless ($frame->IsActive); $self->{notifier}->notify($message); }