Re: Can't un-minimize windows
I think, I am making progress. But I also think I have reached the end of
what I can do without breaking things. See the end of this message for a
patch that works but that is unlikely to be correct.
First, let's review what I have done, as that should shed some light on how
things are supposed to work.
I traced the code that gnome-panel executes. I looked at the source code
from http://anonscm.debian.org/pkg-mate/libwnck.git as downloaded by
"apt-get source libwnck3".
As far as I can tell, the code really only performs a single relevant X11
call (the rest is just boiler plate code):
- item_activated_callback() at window-action-menu.c:167 calls
- wnck_window_unminimize() at window.c:1506 calls
- wnck_window_activate_transient() at window.c:2039 calls
- wnck_window_activate() at window.c:1930 calls
- _wnk_activate() at xutils.c:1058 calls
XSendEvent(display, root,
False, SubstructureRedirectMask|SubstructureNotifyMask,
{
type: ClientMessage,
serial: 0,
send_event: True,
display: display,
window: xwindow,
message_type: atom_get("_NET_ACTIVE_WINDOW"),
format: 32,
data: { client_type(): 2, timestamp, 0, 0, 0 },
});
Looking the specs at
https://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#idm140130317679168
that appears reasonable; and it is different from xdotool, which merely
maps the window without going through EXMH. That explains the difference in
behavior that I noticed yesterday.
Looking at the awesome source code, it handles an _NET_ACTIVE_WINDOW event
at ewmh.c:455. I traced that code as well, and it is emitting a signal
"request::activate" at ewmh.c:468. That signal is caught in ewmh.activate()
at ewmh.lua:107.
I added an extra line at the beginning of this function, unconditionally
setting
c.minimized = false
That change does in fact fix the bug and I can unminimize windows. Very
cool! I fixed something :-) Unfortunately, it also unminimizes windows when
they shouldn't be (e.g. when reloading the window manager). So, clearly,
the patch needs to be a little more complicated than what I can do. But
hopefully, I have traced and documented things sufficiently that somebody
else can chime in now. I am afraid, a correct fix needs a better
understanding of awesome's internals.
Markus
On Sat, Apr 23, 2016 at 1:05 PM, Markus Gutschke
wrote:
> I am running "awesome git" now (after some struggles to fix my rc.lua;
> mostly my fault, and not 100% done quite yet). The behavior is unchanged. I
> also patched out 02be8943 just to see if it makes a difference, but it
> doesn't appear to.
>
> I don't know if you have access to a system running Xenial (or at least to
> a chroot environment). If you do, you could take a look at the source code
> for libwnck3-3.14.1, which you can get with "apt-get source libwnck". I
> believe, that's the code that runs when I try to (un)minimize a window from
> the gnome-panel (that only took forever to track down; GNOME has a funny
> way how it splits components into libraries that I wasn't previously aware
> of).
>
> Alternatively, I think you should be able to get the sources from "git
> clone git://anonscm.debian.org/pkg-mate/libwnck.git"
>
> I am starting to push the limits of my understanding how X11 works. So, I
> have a hard time reading that code. But I suspect it'll explain what GNOME
> is trying to do and if only I could wrap my head around it, I could
> probably see why this doesn't work with awesome. Maybe, you'll have better
> luck reading that code; but I'll keep trying.
>
> I think, you need to look at wnck_window_unminimize() and then follow the
> code.
>
>
> Markus
>
>
> On Sat, Apr 23, 2016 at 12:24 AM, Elv1313 . wrote:
>
>> Hello again,
>>
>> It indeed seems like a bug. Can you try to install either Awesome git
>> version or revert to something before commit 02be8943 (like 3.5.6 from
>> Ubuntu 15.10 package archive) and see what happen?
>>
>> Thanks for looking into this.
>>
>> On 23 April 2016 at 03:00, Markus Gutschke wrote:
>> > I am using GNOME in "fall back" mode. It gives me a gnome-panel and I
>> can
>> > add a task list to this panel.
>> >
>> > In the task list, it shows me an entry for all windows; both on-screen
>> and
>> > minimized. If I right-click on this entry, I get a pop-up menu that
>> allows
>> > me to select "unminimize". But if I select that entry, nothing happens.
>> >
>> > I tried installing both Cinnamon and MATE to see if maybe it had
>> something
>> > to do with the version of GNOME or of the GNOME tools that these
>> > environments pull in. But no matter which version of GNOME that I use,
>> the
>> > same thing happens:
>> >
>> > I can un-minimize just fine, if and only if I use the window manager
>> that
>> > comes with GNOME (i.e. metacity, marco, or compiz). But if I switch to
>> > "awesome" nothing happens.
>> >
>> > To make matters even more confusing, if I use "xdotool windowmap", then
>> I
>> > can restore the iconified
Re: Can't un-minimize windows
I am running "awesome git" now (after some struggles to fix my rc.lua; mostly my fault, and not 100% done quite yet). The behavior is unchanged. I also patched out 02be8943 just to see if it makes a difference, but it doesn't appear to. I don't know if you have access to a system running Xenial (or at least to a chroot environment). If you do, you could take a look at the source code for libwnck3-3.14.1, which you can get with "apt-get source libwnck". I believe, that's the code that runs when I try to (un)minimize a window from the gnome-panel (that only took forever to track down; GNOME has a funny way how it splits components into libraries that I wasn't previously aware of). Alternatively, I think you should be able to get the sources from "git clone git://anonscm.debian.org/pkg-mate/libwnck.git" I am starting to push the limits of my understanding how X11 works. So, I have a hard time reading that code. But I suspect it'll explain what GNOME is trying to do and if only I could wrap my head around it, I could probably see why this doesn't work with awesome. Maybe, you'll have better luck reading that code; but I'll keep trying. I think, you need to look at wnck_window_unminimize() and then follow the code. Markus On Sat, Apr 23, 2016 at 12:24 AM, Elv1313 . wrote: > Hello again, > > It indeed seems like a bug. Can you try to install either Awesome git > version or revert to something before commit 02be8943 (like 3.5.6 from > Ubuntu 15.10 package archive) and see what happen? > > Thanks for looking into this. > > On 23 April 2016 at 03:00, Markus Gutschke wrote: > > I am using GNOME in "fall back" mode. It gives me a gnome-panel and I can > > add a task list to this panel. > > > > In the task list, it shows me an entry for all windows; both on-screen > and > > minimized. If I right-click on this entry, I get a pop-up menu that > allows > > me to select "unminimize". But if I select that entry, nothing happens. > > > > I tried installing both Cinnamon and MATE to see if maybe it had > something > > to do with the version of GNOME or of the GNOME tools that these > > environments pull in. But no matter which version of GNOME that I use, > the > > same thing happens: > > > > I can un-minimize just fine, if and only if I use the window manager that > > comes with GNOME (i.e. metacity, marco, or compiz). But if I switch to > > "awesome" nothing happens. > > > > To make matters even more confusing, if I use "xdotool windowmap", then I > > can restore the iconified window just fine. Of course, that's a horrible > > user experience, as you explained in your e-mail as well. I really need > some > > way to trigger this action from the user interface. > > > > I wonder what that task-list in the GNOME panel does that is suddenly > > incompatible with awesome but that works with other window managers? > > > > I tried looking at events with "xev". When I minimize the window, it > always > > receives these events: > > > >> PropertyNotify event, serial 20, synthetic NO, window 0x200088a, > >> atom 0x137 (WM_STATE), time 27896361, state PropertyNewValue > >> UnmapNotify event, serial 20, synthetic NO, window 0x200088a, > >> event 0x200088a, window 0x200088a, from_configure NO > >> PropertyNotify event, serial 20, synthetic NO, window 0x200088a, > >> atom 0x109 (_NET_WM_STATE), time 27896361, state PropertyNewValue > > > > > > This happens independent of whether I press Mod-n, whether I minimize > from > > the gnome-panel, or whether I use "xdotool". > > > > But when I try to restore the window, the events differ. If I use > "xdotool" > > (or run with a window manager other than awesome), then these are the > > relevant events that I see: > > > >> PropertyNotify event, serial 21, synthetic NO, window 0x200088a, > >> atom 0x137 (WM_STATE), time 28174332, state PropertyNewValue > >> MapNotify event, serial 21, synthetic NO, window 0x200088a, > >> event 0x200088a, window 0x200088a, override NO > >> PropertyNotify event, serial 21, synthetic NO, window 0x200088a, > >> atom 0x109 (_NET_WM_STATE), time 28174332, state PropertyNewValue > >> VisibilityNotify event, serial 21, synthetic NO, window 0x200088a, > >> state VisibilityUnobscured > > > > > > In the same situation, running awesome and clicking on the task list, I > only > > ever see: > > > >> PropertyNotify event, serial 21, synthetic NO, window 0x200088a, > >> atom 0x109 (_NET_WM_STATE), time 28217623, state PropertyNewValue > > > > > > Notice the absence of the change to WM_STATE. > > > > > > > > Markus >
Re: Can't un-minimize windows
Hello again, It indeed seems like a bug. Can you try to install either Awesome git version or revert to something before commit 02be8943 (like 3.5.6 from Ubuntu 15.10 package archive) and see what happen? Thanks for looking into this. On 23 April 2016 at 03:00, Markus Gutschke wrote: > I am using GNOME in "fall back" mode. It gives me a gnome-panel and I can > add a task list to this panel. > > In the task list, it shows me an entry for all windows; both on-screen and > minimized. If I right-click on this entry, I get a pop-up menu that allows > me to select "unminimize". But if I select that entry, nothing happens. > > I tried installing both Cinnamon and MATE to see if maybe it had something > to do with the version of GNOME or of the GNOME tools that these > environments pull in. But no matter which version of GNOME that I use, the > same thing happens: > > I can un-minimize just fine, if and only if I use the window manager that > comes with GNOME (i.e. metacity, marco, or compiz). But if I switch to > "awesome" nothing happens. > > To make matters even more confusing, if I use "xdotool windowmap", then I > can restore the iconified window just fine. Of course, that's a horrible > user experience, as you explained in your e-mail as well. I really need some > way to trigger this action from the user interface. > > I wonder what that task-list in the GNOME panel does that is suddenly > incompatible with awesome but that works with other window managers? > > I tried looking at events with "xev". When I minimize the window, it always > receives these events: > >> PropertyNotify event, serial 20, synthetic NO, window 0x200088a, >> atom 0x137 (WM_STATE), time 27896361, state PropertyNewValue >> UnmapNotify event, serial 20, synthetic NO, window 0x200088a, >> event 0x200088a, window 0x200088a, from_configure NO >> PropertyNotify event, serial 20, synthetic NO, window 0x200088a, >> atom 0x109 (_NET_WM_STATE), time 27896361, state PropertyNewValue > > > This happens independent of whether I press Mod-n, whether I minimize from > the gnome-panel, or whether I use "xdotool". > > But when I try to restore the window, the events differ. If I use "xdotool" > (or run with a window manager other than awesome), then these are the > relevant events that I see: > >> PropertyNotify event, serial 21, synthetic NO, window 0x200088a, >> atom 0x137 (WM_STATE), time 28174332, state PropertyNewValue >> MapNotify event, serial 21, synthetic NO, window 0x200088a, >> event 0x200088a, window 0x200088a, override NO >> PropertyNotify event, serial 21, synthetic NO, window 0x200088a, >> atom 0x109 (_NET_WM_STATE), time 28174332, state PropertyNewValue >> VisibilityNotify event, serial 21, synthetic NO, window 0x200088a, >> state VisibilityUnobscured > > > In the same situation, running awesome and clicking on the task list, I only > ever see: > >> PropertyNotify event, serial 21, synthetic NO, window 0x200088a, >> atom 0x109 (_NET_WM_STATE), time 28217623, state PropertyNewValue > > > Notice the absence of the change to WM_STATE. > > > > Markus -- To unsubscribe, send mail to [email protected].
Re: Can't un-minimize windows
I am using GNOME in "fall back" mode. It gives me a gnome-panel and I can add a task list to this panel. In the task list, it shows me an entry for all windows; both on-screen and minimized. If I right-click on this entry, I get a pop-up menu that allows me to select "unminimize". But if I select that entry, nothing happens. I tried installing both Cinnamon and MATE to see if maybe it had something to do with the version of GNOME or of the GNOME tools that these environments pull in. But no matter which version of GNOME that I use, the same thing happens: I can un-minimize just fine, if and only if I use the window manager that comes with GNOME (i.e. metacity, marco, or compiz). But if I switch to "awesome" nothing happens. To make matters even more confusing, if I use "xdotool windowmap", then I can restore the iconified window just fine. Of course, that's a horrible user experience, as you explained in your e-mail as well. I really need some way to trigger this action from the user interface. I wonder what that task-list in the GNOME panel does that is suddenly incompatible with awesome but that works with other window managers? I tried looking at events with "xev". When I minimize the window, it always receives these events: PropertyNotify event, serial 20, synthetic NO, window 0x200088a, > atom 0x137 (WM_STATE), time 27896361, state PropertyNewValue > UnmapNotify event, serial 20, synthetic NO, window 0x200088a, > event 0x200088a, window 0x200088a, from_configure NO > PropertyNotify event, serial 20, synthetic NO, window 0x200088a, > atom 0x109 (_NET_WM_STATE), time 27896361, state PropertyNewValue This happens independent of whether I press Mod-n, whether I minimize from the gnome-panel, or whether I use "xdotool". But when I try to restore the window, the events differ. If I use "xdotool" (or run with a window manager other than awesome), then these are the relevant events that I see: PropertyNotify event, serial 21, synthetic NO, window 0x200088a, > atom 0x137 (WM_STATE), time 28174332, state PropertyNewValue > MapNotify event, serial 21, synthetic NO, window 0x200088a, > event 0x200088a, window 0x200088a, override NO > PropertyNotify event, serial 21, synthetic NO, window 0x200088a, > atom 0x109 (_NET_WM_STATE), time 28174332, state PropertyNewValue > VisibilityNotify event, serial 21, synthetic NO, window 0x200088a, > state VisibilityUnobscured In the same situation, running awesome and clicking on the task list, I only ever see: PropertyNotify event, serial 21, synthetic NO, window 0x200088a, > atom 0x109 (_NET_WM_STATE), time 28217623, state PropertyNewValue Notice the absence of the change to WM_STATE. Markus
Re: Can't un-minimize windows
Hello Markus, The new Ubuntu release is the first (LTS) to ship with the 3.5 version of Awesome. This version has indeed some changes to how minimized clients work compared to 3.4. It is hard to minimize clients because GNOME 3 doesn't really want you to do that. In the default Awesome config, you can unminimze clients by clicking on them in the tasklist or adding a new shortcut. In your case, given you probably disable the widget bar to use the gnome provided by GNOME, you removed the only way to unminimize clients. Pressing mod4+n twice will not unminimze clients because it act on the focused clients and a minimized client, by definition, cannot have the focus. There was a bug at some point that bypassed this and made it work anyway, but it was a bug, not a feature. To unminimize a random client, you can use: for _,c in client.get() do if c.minimized then c.minimized = false; break; end end In a shortcut. If you added some kind of minimize widget to GNOME taskbar and it still doesn't work, then this is something else. Minimizing seem to work fine without GNOME. Commit 02be8943 may or may not have caused a regression in GNOME, but it hasn't elsewhere, so the issue may (or may not) be on their side. On 22 April 2016 at 14:35, Markus Gutschke wrote: > I have been using awesome for many years. I install it as the window manager > in a GNOME fallback session on Ubuntu. In other words, I have all of the > GNOME session manager, and I have the old-school GNOME panel. But everything > else is awesome. > > This has worked beautifully for as long as I can remember. But today, I > decided to update to the new Ubuntu LTS release (Xenial). The upgrade went > surprisingly uneventful. After waiting for an hour, the computer rebooted > and at first sight, everything looked exactly the same as before. That's > good! > > Well, until I tried to minimize windows (either from the gnome-panel, or > using Mod-n). The window minimizes just fine, but I can't figure out how to > restore it. As far as I can tell, un-minimize has absolutely no effect. I > installed the most recent version of awesome, and still no improvement. > > I am a bit at a loss how to debug this problem. Does anybody have a > suggestion of where I should even start looking? > > Thanks > > > Markus -- To unsubscribe, send mail to [email protected].
