mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Draw black background from CSS when GL fails
When GLArea gets a GL error it leaves user with nothing, but transparent background with error text in the middle. Make it look somewhat decent by drawing black background for the not working video widget.
This commit is contained in:
@@ -467,6 +467,16 @@ class ClapperPlayer extends PlayerBase
|
||||
this.widget.disconnect(this._realizeSignal);
|
||||
this._realizeSignal = null;
|
||||
|
||||
if(this.widget.get_error) {
|
||||
const error = this.widget.get_error();
|
||||
if(error) {
|
||||
debug('player widget error detected');
|
||||
debug(error);
|
||||
|
||||
this.widget.add_css_class('blackbackground');
|
||||
}
|
||||
}
|
||||
|
||||
const root = this.widget.get_root();
|
||||
if(!root) return;
|
||||
|
||||
|
Reference in New Issue
Block a user