winapps icon indicating copy to clipboard operation
winapps copied to clipboard

Paint.net's sub-windows always floats on top of all windows unless main window is minimised

Open MacroHard-Winux opened this issue 2 years ago • 3 comments

The problem The sub-windows of paint.net (colour, layers, history, tools) does not hide alongside the main window and stayed on top of all windows, even on other desktops. But get minimised when the main window get minimised DE/WM KDE Plasma & I3wm Video https://github.com/winapps-org/winapps/assets/68761233/619b4e61-f9e4-441f-b6c8-cbf7c32de7ef My current work around A very janky bash script that automatically minimise the main window when it is not focused for 4 seconds. It only works in floating window manager, where you can minimise a window

#!/bin/bash

# Define function to minimize windows
minimize_windows() {
    # Get the list of window IDs corresponding to "RAIL" class
    window_ids=$(xdotool search --classname RAIL)

    # Loop through each window ID
    for id in $window_ids; do
        # Check if the window is focused
        is_focused=$(xdotool getwindowfocus | grep -c "$id")

        # If the window is not focused, wait for 5 seconds and then minimize it
        if [ "$is_focused" -eq 0 ]; then
            sleep 1
            xdotool windowminimize "$id"
        fi
    done
}

# Continuously loop until Ctrl+C is pressed
while true; do
    minimize_windows
done

MacroHard-Winux avatar Apr 05 '24 02:04 MacroHard-Winux

Closing this in favour of #80.

oskardotglobal avatar May 17 '24 09:05 oskardotglobal

Oops, I did it on my other account thinking I haven't posted it yet, sorry :P

MacroHard-Winux avatar May 20 '24 04:05 MacroHard-Winux

No worries mate

oskardotglobal avatar May 20 '24 06:05 oskardotglobal