awesome

Welcome to awesome bug tracking system.
Tasklist

FS#586 - Use screen object rather than integer

Attached to Project: awesome
Opened by Julien Danjou (jd) - Tuesday, 18 August 2009, 13:59 GMT
Last edited by Julien Danjou (jd) - Thursday, 19 November 2009, 13:22 GMT
Task Type Evolution Request
Category Core
Status New
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version git/master
Due in Version 4.0
Due Date Undecided
Percent Complete 30%
Votes 1
Private No

Details

It would be nice to return screen object rather than integer as object attribute.

Then, we could use things like:

client.focus.screen.workarea.x
rather than
screen[client.focus.screen].workarea.x

screen[] would be able to be used with integer or object as key, it would not matter. That would keep compatibility with current code, but ease futur work.
This task depends upon

View Dependency Graph

This task blocks these from closing
FS#687 - Stop restarting on XRandR event
Comment by Uli Schlachter (psychon) - Sunday, 30 March 2014, 16:00 GMT
This change is especially a good idea in combination with FS#687 "Stop restarting on XRandR event", because a screen object would keep refering to the same screen across such an event while a screen index could change its meaning.

I wonder, do we need screen indices at all? Couldn't we just use screen objects everywhere and e.g. support iteration over screen[] to get the list of available screens?

Edit: Oh and screen.count() would need to go, too.
Comment by John C Kha (sirkha) - Sunday, 30 March 2014, 23:11 GMT
I think that this would be a good improvement to the way we handle things.

Loading...