Don't use RequestUserAttention on Linux because it segfaults

This commit is contained in:
Martin 2018-11-07 15:53:55 +01:00
parent a05a55b5e7
commit fc325dc01f
3 changed files with 11 additions and 3 deletions

View File

@ -118,7 +118,9 @@ Status::Status(wxWindow* parent, wxLongLong_t follow_only_process_id)
SetFocus();
Raise();
Show(true);
#if !defined(__WXMAC__) && !defined(__linux__)
RequestUserAttention();
#endif
if (follow_only_process_id == 0)
{

View File

@ -237,7 +237,9 @@ void TrayIcon::OnPopupClick(wxCommandEvent &evt)
{
Info::getInstance()->SetFocus();
Info::getInstance()->Raise();
#if !defined(__WXMAC__) && !defined(__linux__)
Info::getInstance()->RequestUserAttention();
#endif
}
else
{
@ -250,7 +252,9 @@ void TrayIcon::OnPopupClick(wxCommandEvent &evt)
{
Status::getInstance()->SetFocus();
Status::getInstance()->Raise();
#if !defined(__WXMAC__) && !defined(__linux__)
Status::getInstance()->RequestUserAttention();
#endif
}
else
{
@ -301,7 +305,9 @@ void TrayIcon::OnClick(wxCommandEvent &evt)
{
Status::getInstance()->SetFocus();
Status::getInstance()->Raise();
#if !defined(__WXMAC__) && !defined(__linux__)
Status::getInstance()->RequestUserAttention();
#endif
}
else
{

View File

@ -875,9 +875,9 @@ void MyTimer::Notify()
wxMessageDialog* dialog = new wxMessageDialog(NULL,
ask_msg, _("UrBackup - Allow restore"), wxOK | wxCANCEL);
#ifndef __WXMAC__
#if !defined(__WXMAC__) && !defined(__linux__)
dialog->RequestUserAttention();
#endif
#endif
int rc = dialog->ShowModal();
dialog->Destroy();
if(rc == wxID_OK)
@ -907,7 +907,7 @@ void MyTimer::Notify()
wxMessageDialog* dialog = new wxMessageDialog(NULL,
_("Some files could not be deleted or overwritten during the restore process. In order to overwrite/delete the files the system needs to be restarted. Do you want to do this now?"), _("UrBackup - Restart Windows"), wxOK | wxCANCEL);
#ifndef __WXMAC__
#if !defined(__WXMAC__) && !defined(__linux__)
dialog->RequestUserAttention();
#endif
if(dialog->ShowModal() == wxID_OK)