Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
User SwitchToThisWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Sultanov committed Apr 13, 2021
1 parent 959427c commit 18c9a21
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/MainPresenter.zig
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ fn createWidgets(self: *Self) !void {

fn activateWindow(main_window: *MainWindow, dw: SystemInteraction.DesktopWindow) !void {
const self = @fieldParentPtr(Self, "window_callbacks", main_window.callbacks);

if(w.IsIconic(dw.hwnd) != 0) {
_ = w.ShowWindow(dw.hwnd, w.SW_RESTORE);
}

_ = w.SetForegroundWindow(dw.hwnd);
_ = w.SwitchToThisWindow(dw.hwnd, 1);
try hide(self.view);
}

Expand Down

0 comments on commit 18c9a21

Please sign in to comment.