summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/ui.cpp28
-rw-r--r--gui/ui.h5
2 files changed, 1 insertions, 32 deletions
diff --git a/gui/ui.cpp b/gui/ui.cpp
index 37b9b748..2feb806b 100644
--- a/gui/ui.cpp
+++ b/gui/ui.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2015, Stanislaw Halik <sthalik@misaki.pl>
+/* Copyright (c) 2013-2016, Stanislaw Halik <sthalik@misaki.pl>
* Permission to use, copy, modify, and/or distribute this
* software for any purpose with or without fee is hereby granted,
@@ -124,8 +124,6 @@ MainWindow::MainWindow() :
register_shortcuts();
- connect(this, &MainWindow::emit_minimized, this, &MainWindow::mark_minimized, Qt::QueuedConnection);
-
ui.btnStartTracker->setFocus();
}
@@ -558,30 +556,6 @@ void MainWindow::restore_from_tray(QSystemTrayIcon::ActivationReason)
activateWindow(); // for Windows
}
-void MainWindow::changeEvent(QEvent* e)
-{
- if (e->type() == QEvent::WindowStateChange)
- {
- const bool is_minimized = windowState() & Qt::WindowMinimized;
-
- if (s.tray_enabled && is_minimized)
- {
- if (!tray)
- ensure_tray();
- hide();
- }
-
- emit_minimized(is_minimized);
- }
-
- QMainWindow::changeEvent(e);
-}
-
-void MainWindow::mark_minimized(bool is_minimized)
-{
- ui.video_frame->setEnabled(!is_minimized);
-}
-
void MainWindow::maybe_start_profile_from_executable()
{
if (!work)
diff --git a/gui/ui.h b/gui/ui.h
index 9c65d6e0..7509e318 100644
--- a/gui/ui.h
+++ b/gui/ui.h
@@ -69,8 +69,6 @@ class MainWindow : public QMainWindow, private State
return modules.filters().value(ui.iconcomboFilter->currentIndex(), nullptr);
}
- void changeEvent(QEvent* e) override;
-
void load_settings();
void load_mappings();
void updateButtonState(bool running, bool inertialp);
@@ -104,14 +102,11 @@ private slots:
void startTracker();
void stopTracker();
void reload_options();
- void mark_minimized(bool is_minimized);
signals:
void emit_start_tracker();
void emit_stop_tracker();
void emit_toggle_tracker();
void emit_restart_tracker();
-
- void emit_minimized(bool);
public:
MainWindow();
~MainWindow();