Skip to content

Centralize WindowPixmap buffer updating code

Aleix Pol Gonzalez requested to merge work/winpix-set-buff into master

Uses a setter and clear method pattern rather than having the code repeated. Instead of keeping a QPointer, now we are a QObject and we get notified about destruction intention directly, so we can clear the pointer when necessary.

--

Ideally, we would get rid of that dis/connect. QObject is not optimised for connecting for such short timespans. In this case we will almost never hit the signal but the buffer gets replaced every time per frame and window on both GTK and Qt (things like firefox doesn't).

Edited by Aleix Pol Gonzalez

Merge request reports

Loading