diff --git a/core/gui/inc/TGuiFactory.h b/core/gui/inc/TGuiFactory.h index 86045fe65642e..6c91e564beb8a 100644 --- a/core/gui/inc/TGuiFactory.h +++ b/core/gui/inc/TGuiFactory.h @@ -50,6 +50,7 @@ class TGuiFactory : public TNamed { virtual TApplicationImp *CreateApplicationImp(const char *classname, int *argc, char **argv); virtual TCanvasImp *CreateCanvasImp(TCanvas *c, const char *title, UInt_t width, UInt_t height); + virtual TCanvasImp *CreateCanvasImpNative(TCanvas *c, const char *title, UInt_t width, UInt_t height); virtual TCanvasImp *CreateCanvasImp(TCanvas *c, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height); virtual TBrowserImp *CreateBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height, Option_t *opt=""); diff --git a/core/gui/src/TGuiFactory.cxx b/core/gui/src/TGuiFactory.cxx index cacc618583bdc..b9302e744a55b 100644 --- a/core/gui/src/TGuiFactory.cxx +++ b/core/gui/src/TGuiFactory.cxx @@ -81,6 +81,14 @@ TCanvasImp *TGuiFactory::CreateCanvasImp(TCanvas *c, const char *title, UInt_t w return new TCanvasImp(c, title, width, height); } +//////////////////////////////////////////////////////////////////////////////// +/// Create a batch version of TCanvasImpNative, skipping the IsWebDisplay check. + +TCanvasImp *TGuiFactory::CreateCanvasImpNative(TCanvas *c, const char *title, UInt_t width, UInt_t height) +{ + return new TCanvasImp(c, title, width, height); +} + //////////////////////////////////////////////////////////////////////////////// /// Create a batch version of TCanvasImp. diff --git a/graf2d/gpad/src/TCanvas.cxx b/graf2d/gpad/src/TCanvas.cxx index ee2b1a0819f32..ecd80939fd852 100644 --- a/graf2d/gpad/src/TCanvas.cxx +++ b/graf2d/gpad/src/TCanvas.cxx @@ -255,7 +255,7 @@ TCanvas::TCanvas(const char *name, Int_t ww, Int_t wh, Int_t winid) : TPad(), fD fUseGL = kFALSE; } - fCanvasImp = gBatchGuiFactory->CreateCanvasImp(this, name, fCw, fCh); + fCanvasImp = gBatchGuiFactory->CreateCanvasImpNative(this, name, fCw, fCh); if (!fCanvasImp) return; CreatePainter();