Cloudef / wlc

High-level Wayland compositor library
MIT License
330 stars 58 forks source link

incorrect results from calling wlc_view_set_geometry #186

Closed xeechou closed 8 years ago

xeechou commented 8 years ago

Hi, I am working on a wlc based compositor project right now. And I am having problem getting correct geometry from calling wlc_view_set_geometry.

I really cannot paste the code here since it is really long. But I will try if anyone asks.

Any help would be appreciated.

Cloudef commented 8 years ago

There's not really enough information to say anything on this. WLC_DEBUG=commit,request may tell you what goes wrong (request especially, make sure you implement request callbacks and ignore them if you don't want clients setting their own geometry).

xeechou commented 8 years ago

Here is some of my output, but I cannot really interpret the log, could you help explaining what does pending view commit 2 (1) pending: 1600x1800 commited: 0x0 surface: 806x491 means?

INFO: => pending view commit 2 (1) pending: 1600x1800 commited: 0x0
surface: 806x491
INFO: => commit view 2
INFO: (2) requested geometry 742x427+0,0
INFO: (2) applied geometry 742x427+0,0
INFO: => pending view commit 2 (1) pending: 742x427 commited: 1600x1800 surface:
806x491
INFO: => commit view 2
INFO: => pending view commit 3 (1) pending: 1600x900 commited: 0x0 surface:
806x491
INFO: => commit view 3
INFO: (3) requested geometry 742x427+0,900
INFO: (3) applied geometry 742x427+0,900
INFO: => pending view commit 3 (1) pending: 742x427 commited: 1600x900 surface:
806x491
INFO: => commit view 3
INFO: => pending view commit 2 (1) pending: 742x427 commited: 742x427 surface:
806x491
INFO: => commit view 2
INFO: => pending view commit 4 (1) pending: 1600x1800 commited: 0x0 surface:
806x491
INFO: => commit view 4
INFO: (4) requested geometry 742x427+1600,0
INFO: (4) applied geometry 742x427+1600,0
INFO: => pending view commit 4 (1) pending: 742x427 commited: 1600x1800 surface:
806x491
INFO: => commit view 4
INFO: => pending view commit 3 (1) pending: 742x427 commited: 742x427 surface:
806x491
INFO: => commit view 3
INFO: => pending view commit 5 (1) pending: 1600x900 commited: 0x0 surface:
806x491
INFO: => commit view 5
INFO: (5) requested geometry 742x427+1600,900
INFO: (5) applied geometry 742x427+1600,900
INFO: => pending view commit 5 (1) pending: 742x427 commited: 1600x900 surface:
806x491
INFO: => commit view 5
INFO: => pending view commit 4 (1) pending: 742x427 commited: 742x427 surface:
806x491
INFO: => commit view 4
INFO: => pending view commit 6 (1) pending: 1600x600 commited: 0x0 surface:
806x491
INFO: => commit view 6
INFO: (6) requested geometry 742x427+1600,1200
INFO: (6) applied geometry 742x427+1600,1200
INFO: => pending view commit 6 (1) pending: 742x427 commited: 1600x600 surface:
806x491
INFO: => commit view 6
INFO: => pending view commit 5 (1) pending: 742x427 commited: 742x427 surface:
806x491
INFO: => commit view 5
Cloudef commented 8 years ago

pending is what you wanted, surface is what client gives, commited is what is applied in the end. You need to override the geometry request callbacks to force clients render at your geometry (this usually implies that the client surface will be stretched).

xeechou commented 8 years ago

Thanks for your help. I will try that first.

xeechou commented 8 years ago

yes, it worked, thanks.