From: Arnout E. <no...@bz...> - 2011-05-02 21:51:23
|
Hi, I refactored a bit and ported most of the logic to the lua side. Also I think I mostly covered the simple use cases updating the screen layout: moving screens, adding screens or changing the screen layout as long as the number of screens doesn't decrease. We'll have to think about what to do when a screen disappears or merges into another due to overlap: what do we want to happen to the children of that screen? I'm not too clear on how the saving/loading infrastructure is supposed to work, so I can't quite decide whether this would be something useful to leverage here. I tested this by calling mod_xinerama.refresh() wherever RandR reports changes. mod_xinerama.update_screen appears to be called with the correct parameters, but the screens do not get resized - we'll have to look into how to resize a screen. Kind regards, Arnout On Sun, Apr 17, 2011 at 08:35:05PM +0200, eb...@dr... wrote: > Hi, > > I did the rewrite of the lua functions. I tried also to make it more > readable code. Also ordering of items when running table.foreach() > function is not defined (although it was correct), thus I had to use > for ... in ipairs(...) at several places for the code to be written the > right way. > > I renamed the previous merge_overlapping_screens algorithm, because > it may be used if we find out how to initialise layout of weird > WScreens (created from the partially overlapped screens) so that it > will be shaped. We need not to investigate here, because there are no > users to use this. But it may be sideefect of some further development. > > On Sun, 17 Apr 2011 12:59:27 +0200 > eb...@dr... wrote: > > > > On Sat, 16 Apr 2011 19:16:12 +0200 > > Arnout Engelen <no...@bz...> wrote: > > > I'm not sure - we'd have to make sure the C WScreen is not obscured > > > by the A+B one... might be neater to merge them, though both > > > behaviors are indeed strange. > > > > You are right, if you focus 'A+B' WScreen then 'C' WScreen is now > > (partially) hidden by the 'A+B'. I'll reimplement the merging > > algorithm in the evening (or in next few days). > > > > I need to think about reimplementation of WScreens and saving and > > loading layouts. The current implementation is not good for laptops > > that are attached to different screen at work, at home and to no > > second screen at all when the user travelling. > > > > > I checked out your branch and the lua logic crashed on me. I added a > > > 'test' lua script to the 'split' branch at sf.net . > > > > Hmm, that bug was introduced in order stabilising patch. Fixed now and > > pushed to my public repository, together with a small patch to accept > > any numeric indices in setup_screens (to be consistent with notion). > > > > > Kind regards, > > > > > > Arnout > > > > -- > > Tomáš 'ebík' Ebenlendr > > PF 2011.29184056317 > > > > > -- > Tomáš 'ebík' Ebenlendr > PF 2011.29273392314 > |