[Weston] More discussion about weston output relative motion algorithm

Wang, Quanxian quanxian.wang at intel.com
Fri May 9 01:52:15 PDT 2014


Hi, Pq

Thanks for your comment and idea.

 I list several cases for discussion.

Case 1:
Original:
├──
│ B   │ 
└──
Action: Move A leftof B
├───┼───┤
│ A │ B │
└───┴───┘ 
As you said, B must not change, A will have negative coordinates. That is fine.

Case 2:
Original:
├───┼───┤
│ C │ D │E
└───┴───┘ 

Move D leftof C:
C must not change.
How about E? E does not need change.
├───┼───┤
│ D │ C  │     | E
└───┴───┘
D will have negative coordinates. A big hole is left. It is not accepted by user at least I think so.
An optimization is E will move left and is side with C 
├───┼───┤
│ D │ C  │E
└───┴───┘

Case 3:
├───┼───┤
│ C │ D │E  |  F
└───┴───┘
Action: Move E leftof D
C, D's coordinate will not change. E and C will have the same relation with D, however they are not clone.
F will be move forward. Right?
├───┼───┤
│C/E│D |  F
└───┴───┘

Case 4:
├───┼───┤
│ C │ D │E  |  F
└───┴───┘
│    │      │ G   |  
└───┴───┘
Action: Move E leftof D
C, D's coordinate will not change. E and C will have the same relation with D.
F will be move forward. The relation between F and G will be built up. Maybe you want G to be moved with E. That will be crazy. 
├───┼───┤
│C/E│D |  F |
└───┴───┘
│      │    │ G|  
└───┴───┘

After the cases above, list a complex one. 

├───┼───┤
│      │H  |   I |
└───┴───┘
│      │    │ G|  
├───┼───┤
│C/E│D |  F | K/L│M
└───┴─────┘
│      │    │J |    |     | N|  
└───┴───┘

Move F leftof H, and find some output to take F's position. Then chain reaction will happen.
Here you will define an order who take the place. For example, K/L will take the place of F. What is the relation between G and K or L? what is the relation between J and K or L?
Things turns to be much more complex. Just have a think what will be. It is an interesting thing.

After that, you find a conclusion.
1) position to new place will be easy.
2) find replacer and rebuild the relations will be complex. 
3) Chain reaction will make you crazy. Because no one expect how many outputs will be available and how many links after that. Maybe 1, or 2 or 3 or more...
     It is very easy to be in a loop. And more hole in layout happens.

Anyway, it is a little hard to make everything happy. :)

Thanks

Regards

Quanxian Wang




More information about the wayland-devel mailing list