Skip to content

Commit

Permalink
mag: Unminimize view when activating
Browse files Browse the repository at this point in the history
  • Loading branch information
soreau committed Oct 3, 2023
1 parent afdb5a0 commit 83fddcd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/mag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class wayfire_magnifier : public wf::per_output_plugin_instance_t
wf::activator_callback toggle_cb = [=] (auto)
{
active = !active;
if (active)
if (active || (mag_view && mag_view->minimized))
{
return activate();
} else
Expand Down Expand Up @@ -288,6 +288,11 @@ class wayfire_magnifier : public wf::per_output_plugin_instance_t
{
if (mag_view)
{
if (mag_view->minimized)
{
mag_view->set_minimized(false);
}

return;
}

Expand All @@ -305,6 +310,12 @@ class wayfire_magnifier : public wf::per_output_plugin_instance_t

bool activate()
{
if (mag_view && mag_view->minimized && hook_set)
{
mag_view->set_minimized(false);
return true;
}

if (!output->activate_plugin(&grab_interface))
{
return false;
Expand Down

0 comments on commit 83fddcd

Please sign in to comment.