mate-desktop / marco

MATE default window manager
https://mate-desktop.org
GNU General Public License v2.0
196 stars 87 forks source link

New Windows not opening in front, minimized app not restored #501

Open markd89 opened 5 years ago

markd89 commented 5 years ago

Hi,

I'm running Mate 1.20.4 under Debian Stretch.

Two probably related issues:

  1. I have two profiles for Palemoon (fork of Firefox). When I start Palemoon, the select Profile dialog opens behind other windows.

  2. I use qpdfview (tabbed PDF viewer). I will often have a PDF open and qdfview minimized. If launch another PDF from the file system, qdfview remains minimized.

I checked dconf editor but don't see any relevant settings. Maybe I am missing one?

Thanks! Mark

markd89 commented 5 years ago

Correcting/Amending: The issue is that the new application window does not get focus. Whatever had focus before continues to have it. So the setting I'm looking for would be "focus window of new application"

markd89 commented 3 years ago

I think there is a general issue in Marco where windowactivate is not being sent. Here's what I did as a workaround.

  1. I renamed the qpdfview binary to qpdfviewbin

2.I created a script called qpdfview containing the following.

#!/bin/bash -e
qpdfviewbin $1 $2
/usr/bin/xdotool search --name " - qpdfview" windowactivate

Some explanation:

  1. I execute qpdfviewbin. It's behavior is to open the file passed on the command line. If qpdfview is already running it just opens a new tab with the new PDF.
  2. xdotool brings qpdfview to the foreground. If it was behind another window or minimized, it's now in front which is the desired behavior.
rdiez commented 1 year ago

I am having similar difficulties on a new Ubuntu MATE 22.04.3 and I wonder what is going on.

I normally open shell consoles inside Emacs. If I run command 'caja' in such a shell, then a new Caja window opens as usual on top of Emacs. But after a while, this normal behaviour stops working, and new Caja windows start opening behind the Emacs window. From that point on, every new Caja window opens behind. If I close Emacs and restart it, then the normal behaviour is restored.