Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

right click and property dialog #14

Open
ali0une opened this issue Dec 26, 2014 · 10 comments
Open

right click and property dialog #14

ali0une opened this issue Dec 26, 2014 · 10 comments

Comments

@ali0une
Copy link

ali0une commented Dec 26, 2014

Hi!
Using latest version with Gnome 3.14 when i right click something like a folder in Nautilus or to get the menu in Firefox to display the source code i always get a cross to replace my cursor, then i have to right click again to get the property dialog or the source code. Also the window that opens sometimes doesn't display nice.
Tell me how can i give you a log to work on this issue.

@deadalnix
Copy link
Collaborator

I'm not sure how pixel saver can cause that. Would you have a screenshot or something ?

@Damus765
Copy link

Hi.
I'm experiencing the same issue. Pixel saver is the only activated extension, and the issue only appear when pixel saver is activated so I assume it must be the cause of this problem, but I have no clue why.
Unlike ali0une, I have no problem with firefox. I only noticed it with nautilus.
Here are some screenshots (I took a photo of my screen because surprisingly, when I tried to make a screenshot during the issue, gnome-shell crashed) :
When I right-click on a folder or a file and click on properties :
dsc_0827
I get this crossed cursor :
dsc_0828
Then I have to click again on the nautilus window (if I click elsewhere, nothing happens) for the property dialog to appear :
dsc_0829
I'm using Fedora 21, with GNOME Shell 3.14.4 and pixel saver 1.4 (from github).
If you need more infos, you can ask me what you need.

@deadalnix
Copy link
Collaborator

That is super weird. I honestly have no idea what can be the source of the problem, pixel saver doesn't even play with the cursor (well, not directly or intentionally anyway).

@Damus765
Copy link

I think this issue might be related to this one, as Pixel Saver and Maximus Two share some code. Unfortunately, it seems like they don't managed to fix it either.

@dffischer
Copy link

The crosshair looks exactly like the one xprop would use when asking the user to select a window. So the bug may probably hide somewhere near the invocations of xprop or xwminfo.

@deadalnix
Copy link
Collaborator

Ha yes, pixel saver is using xprop. Could you put some log around the xprop call to see what is going on when you repro ?

@Damus765
Copy link

I wasn't able to find any log about xprop specificaly, but I got this in my logs (using journalctl -f):

When I right-click, then click on properties :
(also appear when pixel-saver is disabled, so maybe irrelevant)

Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

When I click on nautilus with the crosshair for the property dialog to appear :

(gnome-shell:1751): Gjs-WARNING **: JS ERROR: ReferenceError: id is not defined
guessWindowXID@/home/robin/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/decoration.js:69
onWindowAdded/<@/home/robin/.local/share/gnome-shell/extensions/pixel-saver@deadalnix.me/decoration.js:216

I don't know how to get more accurate logs.

@deadalnix
Copy link
Collaborator

Well the one at line 69 is due to nonsensical code of mine. Problem is, have I have no idea what I intended to write at the time.

Javascript is such a wonderful piece of shit. This code shouldn't have compiled on any sane plateform.

@deadalnix
Copy link
Collaborator

Ok I have a repro. I still have no idea what is going on, but I guess this is progress.

@Damus765
Copy link

I did a little testing and I found that Crazygolem on this issue report was right. The problem comes from this command line in decoration.js (l. 52) :

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

It appears that act['x-window'] is undefined for the nautilus "properties" window's actor. And therefore, the executed command becomes :

xwininfo -children -id 0x

When I execute this command in a terminal, I get the exact same behavior as when I repro the issue, with xwininfo asking me to select the window about which I would like information by clicking the mouse in that window. So, when xwininfo doesn't have a proper id parameter, it just ask the user to select the window with this crosshair cursor.
Here are some values of variables in decoration.js between l. 50 to l. 72 when I repro, hope this will help for debugging :

l.51: act: [0x3407bc0 MetaWindowActor]

l.52: act['x-window']: undefined

l.53: xwininfo[0]: true

l.54: str:
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
xwininfo: Window id: 0x180bcd2 "Propriétés de decoration.js"
Root window id: 0xa0 (the root window) (has no name)
Parent window id: 0xa0 (the root window) (has no name)
1 child:
0x180bcd3 (has no name): () 1x1+-1+-1 +278+120

l.61: m: 0x180bcd2 "Propriétés de decoration.js",0x180bcd2

l.62: m[1]: 0x180bcd2

So, as a workaround, I just changed (l. 51):

if (act) {

to

if (act && act['x-window']) {

which did the trick for now. Of course, I got this in my logs :

Gjs-Message: JS LOG: [pixel-saver]: Could not find XID for window with title Propriétés de decoration.js
Gjs-Message: JS LOG: [pixel-saver]: Finding XID for window Propriétés de decoration.js failed

But it doesn't seems to be problematic (the properties dialog can't be maximized anyway).
So, maybe not the best solution, but I don't know how to guess the X ID of this window by other means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants