linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #02304
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2277: restore the main window when clicking on a taskbar thumbnail
------------------------------------------------------------
revno: 2277
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sun 2010-10-31 14:07:37 +0100
message:
restore the main window when clicking on a taskbar thumbnail
modified:
dwt/src/Taskbar.cpp
win32/MainWindow.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dwt/src/Taskbar.cpp'
--- dwt/src/Taskbar.cpp 2010-10-29 15:30:05 +0000
+++ dwt/src/Taskbar.cpp 2010-10-31 13:07:37 +0000
@@ -140,9 +140,15 @@
tab->onTextChanging([proxy](const tstring& text) { proxy->setText(text); });
tab->onSized([proxy](const SizedEvent&) { DwmInvalidateIconicBitmaps(proxy->handle()); });
+ // forward taskbar events that were sent to the proxy window to the actual tab window.
proxy->onActivate([this, tab](bool activate) {
- if(activate)
+ if(activate) {
activateF(tab);
+ if(window->isIconic())
+ window->restore();
+ else
+ window->setVisible(true);
+ }
});
proxy->onClosing([tab]() -> bool {
tab->close(true);
=== modified file 'win32/MainWindow.cpp'
--- win32/MainWindow.cpp 2010-10-28 22:43:23 +0000
+++ win32/MainWindow.cpp 2010-10-31 13:07:37 +0000
@@ -954,7 +954,7 @@
void MainWindow::handleSettings() {
// this may be called directly from the tray icon when the main window is still hidden
- if(::IsIconic(handle()))
+ if(isIconic())
handleRestore();
SettingsDialog dlg(this);
@@ -1373,7 +1373,7 @@
}
void MainWindow::handleTrayClicked() {
- if(::IsIconic(handle())) {
+ if(isIconic()) {
handleRestore();
} else {
minimize();