fix dialog: better scrollbar management
fix dialog: better scrollbar management

The check done every 500ms watched only the current height of the dialog
before updating the height & scrollbar. If the current height was set,
the height did not change.

By checking the real height and not the current, and also checking the
window height, the scrollbar is updated as wanted.

Also, better performances by optimizing the code executed.

Ener-Getick/lumX,jason588/lumX,itxd/lumX,terradatum/lumX,clementprevot/lumX,jason588/lumX,lumapps/lumX,jefvel/lumX,cupceavictor/lumX,bright-sparks/lumX,jayaguilar/lumX,clementprevot/lumX,ezzye/write-to-be-heard,bright-sparks/lumX,Ener-Getick/lumX,hinablue/lumX,itxd/lumX,clementprevot/lumX,terradatum/lumX,jayaguilar/lumX,bright-sparks/lumX,bijeeshtk/lumx,daniel-oliveiravas/lumX,ezzye/write-to-be-heard,Ener-Getick/lumX,cupceavictor/lumX,bijeeshtk/lumx,lumapps/lumX,ezzye/write-to-be-heard,jefvel/lumX,noikiy/lumX,jayaguilar/lumX,Ener-Getick/lumX,noikiy/lumX,cupceavictor/lumX,b-cuts/lumX,terradatum/lumX,hinablue/lumX,noikiy/lumX,jayaguilar/lumX,cupceavictor/lumX,itxd/lumX,lumapps/lumX,itxd/lumX,ezzye/write-to-be-heard,daniel-oliveiravas/lumX,bright-sparks/lumX,daniel-oliveiravas/lumX,b-cuts/lumX,noikiy/lumX,hinablue/lumX,lumapps/lumX,jason588/lumX,daniel-oliveiravas/lumX,jefvel/lumX,hinablue/lumX,jason588/lumX,b-cuts/lumX,b-cuts/lumX,bijeeshtk/lumx,bijeeshtk/lumx,clementprevot/lumX,terradatum/lumX,jefvel/lumX