[vlc-devel] [PATCH] qt: prevent setMinimalView() from sizing incorrectly on fullscreen exit

Rémi Denis-Courmont remi at remlab.net
Tue Mar 8 00:12:23 CET 2016


Le 2016-03-08 00:53, Darrell Walisser a écrit :
> On Mon, Mar 7, 2016 at 8:30 AM, Jean-Baptiste Kempf <jb at videolan.org
> [1]> wrote:
>
>> On 28 Feb, Darrell Walisser wrote :
>> > +        /* The original widget width() and height() wont be
>> realized
>> > +         * immediately (maybe a bug in Qt). Using a timer
>> wont
>> > +         * work because it is unknown how long this could
>> take.*/
>> > +         while (fullScreenSize == size())
>>
>> This is really too ugly.
>
> Yes, its ugly, but it is working around a bug in Qt, and a more
> serious issue with the UI. There is the windowStateChanged()
> signal/event in Qt but I bet it has the same problem.

It is perfectly normal and expected for size not to change immediately. 
Window management is asynchronous since it is done by another process 
altogether. You request something, and it might be accepted, rejected or 
modified. In any case, if anything changes, you should be notified via 
relevant callback (i.e. Qt signals).

Note that if it is rejected, you might _never_ be notified of anything. 
A typical example would be attempting to resize a maximized or 
fullscreen window.

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list