From db43bd82a773dae83d44f6bf2ad3726882015a92 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 5 Dec 2018 21:03:12 -0700 Subject: [PATCH] gtk3: Remove scrollbars Under GTK3, the scrollbars fade in and out, causing a cascade of re-paint events. These cause KiCad to be unresponsive while the repaint events occur. By default this is 1s fade in 1s fade out but can be configured by the user/wm. Area mapping the repaint events to just scrollbar areas will be a good solution but until/unless that happens the scrollbars in GTK3 are problematic. --- common/draw_panel_gal.cpp | 6 ++++++ common/view/wx_view_controls.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/common/draw_panel_gal.cpp b/common/draw_panel_gal.cpp index 99913493e3..5bf558e4d2 100644 --- a/common/draw_panel_gal.cpp +++ b/common/draw_panel_gal.cpp @@ -72,7 +72,13 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin SwitchBackend( aGalType ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); +#ifdef __WXGTK3__ + // Until we can handle the repaint events from scroll bar hide/show + // todo: Implement area mapping for re-painting scrollbars + ShowScrollbars( wxSHOW_SB_NEVER, wxSHOW_SB_NEVER ); +#else ShowScrollbars( wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS ); +#endif EnableScrolling( false, false ); // otherwise Zoom Auto disables GAL canvas Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 61979f65b6..180232b3b2 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -602,6 +602,12 @@ wxPoint WX_VIEW_CONTROLS::getMouseScreenPosition() const void WX_VIEW_CONTROLS::UpdateScrollbars() { +#ifdef __WXGTK3__ + // Until we can handle the repaint events from scroll bar hide/show + // todo: Implement area mapping for re-painting scrollbars + return; +#endif + const BOX2D viewport = m_view->GetViewport(); const BOX2D& boundary = m_view->GetBoundary();