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

quake: invalid object sometimes #346

Closed
jmtd opened this issue Jul 6, 2017 · 6 comments
Closed

quake: invalid object sometimes #346

jmtd opened this issue Jul 6, 2017 · 6 comments

Comments

@jmtd
Copy link

jmtd commented Jul 6, 2017

awesome v4.0 (Harder, Better, Faster, Stronger)
• Compiled against Lua 5.1.5 (running with Lua 5.1)
• D-Bus support: ✔
• execinfo support: ✔
• RandR 1.5 support: ✔
• LGI version: 0.9.1

Using the quake util via the following in my rc.lua

local lain = require("lain")
…
awful.screen.connect_for_each_screen(function(s)
…
    s.quake = lain.util.quake()
end)

The key shortcut hook:

globalkeys = awful.util.table.join(
…
    awful.key({ modkey }, "`", function () awful.screen.focused().quake:toggle() end)
)

On occasion, rather than show or hide the terminal (which is defaulting to xterm), I get a pop-up error message Oops, an error has happened! /usr/share/awesome/lib/awful/client.lua:1060: invalid object

This happens after I've added or removed an external display. For example, just now, I've added an external display, used the key shortcut to show the quake terminal (which worked, and displayed on my external display) but the same key shortcut immediately afterwards to hide it failed. Exiting the terminal and trying the key shortcut causes the error too (no more quake console for me until I restart awesome)

Interestingly, if I switch focus to my laptop display, the key shortcut is spawning an xterm, but it is not placing it in the right place (it's being tiled like a normal window), the shortcut is not hiding it again, anda subsequent (3rd, 5th, 7th, etc.) press of the shortcut spawns a second (3rd, 4th..) xterm. No errors displays for this sequence of events.

my rc.lua is an otherwise almost unmodified copy of /etc/xdg/awesome/rc.lua from the debian package.

@jmtd
Copy link
Author

jmtd commented Jul 6, 2017

I've restarted awesome. I have two displays. On the internal display, post restart, the shortcut is spawning xterms which are not being resized and are being tiled like normal. Subsequent invocations are spawning more xterms and the error quake.lua:165: attempt to index a nil value.

On my external display the shortcut and terminal placement are all working correctly.

@jmtd
Copy link
Author

jmtd commented Jul 6, 2017

These issues are resolved (For static multi-monitor) by specifying followtag = true as the docs suggest. I haven't yet re-tested unplugging or replugging a display.

@lcpz
Copy link
Owner

lcpz commented Jul 6, 2017

I haven't yet re-tested unplugging or replugging a display.

I'll wait for this then.

@jmtd
Copy link
Author

jmtd commented Jul 10, 2017

OK I've just tested that situation. It mostly works, although the placement and size of the xterm was wrong (too wide) for the internal panel display after unplugging the external. (it appeared to be using the calculated geometry for the external display, rather than the internal one.)

When replugging I had to fiddle with xrandr to get the display arrangement back the way I wanted it (an awesome bug rather than quake.lua), after which the quake console was working fine.

So followtag = true seems to be more robust and reliable than the default. What are its drawbacks? Would it not make a more sensible default?

@lcpz
Copy link
Owner

lcpz commented Jul 10, 2017

Using followtag makes quake call awful.screen.focused, which in turn goes down to the C API.

The majority uses a single screen setup, so that is useless and can be costly, especially if quake is used a lot.

That's my simple motivation, for now.

In the wiki is reported to set followtag = true if experiencing issues with multiscreen setups. I'll link the note to this issue for further documentation.

When replugging I had to fiddle with xrandr to get the display arrangement back the way I wanted it (an awesome bug rather than quake.lua), after which the quake console was working fine.

Please report it to awesome. Thank you.

@lcpz lcpz closed this as completed Jul 10, 2017
@jmtd
Copy link
Author

jmtd commented Jul 10, 2017

So speed over correctness, gotcha :)

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

2 participants