Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.13.0-RC2][Windows] Tribler window does not unminimized when clicking on a torrent file #7462

Closed
kozlovsky opened this issue Jun 7, 2023 · 0 comments
Assignees

Comments

@kozlovsky
Copy link
Collaborator

When Tribler is running, and a user double-clicks on a torrent file, it is expected that Tribler opens a dialog window suggesting to download the file.

As it turns out, on Windows, when the Tribler window is minimized, and a user double-clicks on a torrent file, the Tribler window is not restored. If the user then manually clicks the Tribler icon at the taskbar notification area, the Tribler window is successfully restored, and the user can see the opened dialog that suggests downloading the file.

The correct behavior is to unminimize the Tribler window automatically.

The code investigation shows that currently, we have two different TriblerWindow methods that restore the minimized window. The first method, restore_from_minimized, is used when the Tribler application receives a new file:

    def restore_from_minimised(self):
        self.setWindowState(self.windowState() & ~Qt.WindowMinimized)
        self.raise_()

The second method, raise_window, is used when the user manually clicks the Tribler icon in the taskbar notification area:

    def raise_window(self):
        self.setWindowState(self.windowState() & ~Qt.WindowMinimized | Qt.WindowActive)
        self.show()
        self.raise_()
        self.activateWindow()

The raise_window method works, and the restore_from_minimised method doesn't. It looks like the same method, raise_window, should be used in both cases, and this change fixes the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant