Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 543b3a14 authored by Jorge Gil's avatar Jorge Gil
Browse files

Disable selected windowing btns in HandleMenu

When the window is already in freeform, the freeform button should not
be clickable otherwise the task will re-attempt to enter freeform. Same
with the other windowing buttons / modes.

Flag: EXEMPT bug fix
Bug: 367976713
Test: enter desktop, press desktop button in handle menu, verify the
task doesn't move

Change-Id: Idbd9d13963f7eefa5b10a837cb9e8c2e438f8d12
parent 709dd860
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -592,12 +592,16 @@ class HandleMenu(
            floatingBtn.visibility = View.GONE

            fullscreenBtn.isSelected = taskInfo.isFullscreen
            fullscreenBtn.isEnabled = !taskInfo.isFullscreen
            fullscreenBtn.imageTintList = style.windowingButtonColor
            splitscreenBtn.isSelected = taskInfo.isMultiWindow
            splitscreenBtn.isEnabled = !taskInfo.isMultiWindow
            splitscreenBtn.imageTintList = style.windowingButtonColor
            floatingBtn.isSelected = taskInfo.isPinned
            floatingBtn.isEnabled = !taskInfo.isPinned
            floatingBtn.imageTintList = style.windowingButtonColor
            desktopBtn.isSelected = taskInfo.isFreeform
            desktopBtn.isEnabled = !taskInfo.isFreeform
            desktopBtn.imageTintList = style.windowingButtonColor
        }