gtk: fix problem wth window freeze & thaw
gtk: fix problem wth window freeze & thaw

Closes PR 12496

Merge to 5.2.1

mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket,mafagafogigante/racket