wilfm / GnomeExtensionMaximusTwo

Removes the title bar on maximised windows. See: https://extensions.gnome.org/extension/844/maximus-two/
63 stars 27 forks source link

Bad arguments for xwininfo #17

Open crazygolem opened 9 years ago

crazygolem commented 9 years ago

When right-clicking or double-clicking in some applications (e.g. nautilus, dia), the mouse pointer becomes a cross and you must click anywhere on the screen to continue doing anything.

E.g.: nautilus

  1. Right-click on a file or directory
  2. Select Properties

I traced the problem back to a call to xwininfo in decoration.js (l. 50):

id = GLib.spawn_command_line_sync('xwininfo -children -id 0x%x'.format(act['x-window']));

I suspect that act['x-window'] might be empty or undefined, as in facts the same behavior happen when I execute xwininfo -id 0x in the terminal (i.e. the command that is executed from the extension if act['x-window'] is empty). However I don't know how to properly debug Gnome extensions and inspect their state, so I won't be able to help much more here.

System info

amitbha commented 9 years ago

Same issue as in #1. I used the log function and found the 'act['x-window']' was empty sometimes. it's ok to check it before using

Karmak23 commented 9 years ago

About the little cross problem, it took me ages to understand from where it came, but I encounter it many times a day.

The most cases where it happens is when hitting Control-R in evolution (to reply to an email). But not always : it can happen 10 consecutive times when evolution is open, or not at all if I relaunch it.

It just happened 15 minutes ago when I opened my gnome session and clicked on the firefox icon from the dock. Firefox didn't show, I had to click anywhere on the desktop for the window to appear. Closing it and reclicking on the icon didn't re-trigger the cross.

I can't reliably determine the conditions that can trigger it, but it's very annoying, to stay polite. It just interferes in nearly every kind of GUI interactions, in a non-deterministic fashion.

Now that I know where it comes from, I won't throw my computer through the window anymore. But if you have a way to catch any exception and avoid the cross, I will thank you a thousand times :-)

Version information:

wilfm commented 9 years ago

I don't have this issue with the on Fedora 21 Gnome Shell 3.14.3 - I probably need a copy of Arch for some other work I need to do, so will do a fix and test it once I have that.

Karmak23 commented 9 years ago

I think a simple if (act && act['x-window'] != null) in https://github.com/wilfm/GnomeExtensionMaximusTwo/blob/master/maximus-two-wilfinitlike.gmail.com/decoration.js#L49 could do the trick. Not sure about the syntax though.

deadalnix commented 9 years ago

:flags:

I'm facing a similar issue, and I'm as puzzled as you guys. Planting my flag here in case there is progress. Will update you if I have progress on my side.