← Back to team overview

kicad-developers team mailing list archive

Re: Default Canvas for v5

 

Sorry about that, attached the wrong patch file.

On Thu, Jan 4, 2018 at 8:39 AM, Wayne Stambaugh <stambaughw@xxxxxxxxx>
wrote:

> Hey Jon,
>
> Did you forget to add a file to this patch?  I'm getting the following
> build error:
>
> CMakeFiles/gerbview_kiface.dir/gerbview_frame.cpp.o: In function
> `GERBVIEW_FRAME::GERBVIEW_FRAME(KIWAY*, wxWindow*)':
> /home/wayne/src/kicad/kicad-trunk/gerbview/gerbview_frame.cpp:218:
> undefined reference to `EDA_DRAW_FRAME::ShowFirstRunDialog(EDA_DRAW_
> FRAME*)'
>
> I don't see a ShowFirstRunDialog() in the patch.
>
> Wayne
>
>
> On 01/03/2018 10:27 PM, Jon Evans wrote:
> > Hi Wayne, Nick,
> >
> > Updated patch attached with your suggestions.
> >
> > -Jon
> >
> > On Wed, Jan 3, 2018 at 3:36 PM, Nick Østergaard <oe.nick@xxxxxxxxx
> > <mailto:oe.nick@xxxxxxxxx>> wrote:
> >
> >     Hmm, maybe it is ok to use the technical terms OpenGL and Cairo in
> >     the help text for the menu item. Afterall those terms have been used
> >     a lot in help forums and launchpad, so it may make it easier for the
> >     curious to discover.
> >
> >     2018-01-03 21:15 GMT+01:00 Wayne Stambaugh <stambaughw@xxxxxxxxx
> >     <mailto:stambaughw@xxxxxxxxx>>:
> >
> >         There is also wxRichMessageDialog[1] which has an optional
> >         checkbox for
> >         show once features.
> >
> >         [1]:
> >         http://docs.wxwidgets.org/3.0/classwx_rich_message_dialog.html
> >         <http://docs.wxwidgets.org/3.0/classwx_rich_message_dialog.html>
> >
> >         On 1/3/2018 3:13 PM, Jon Evans wrote:
> >         > I figured we might want to re-use this in the future if we
> ever have
> >         > additional "show once" things that are more complicated than
> yes/no
> >         > (although I didn't make it with formbuilder).
> >         > It would be fine to switch to a messagedialog.  I can probably
> do that
> >         > tonight.
> >         >
> >         > -Jon
> >         >
> >         > On Wed, Jan 3, 2018 at 3:09 PM, Wayne Stambaugh <
> stambaughw@xxxxxxxxx <mailto:stambaughw@xxxxxxxxx>
> >         > <mailto:stambaughw@xxxxxxxxx <mailto:stambaughw@xxxxxxxxx>>>
> wrote:
> >         >
> >         >     John,
> >         >
> >         >     I took a look at your patch.  Is there any reason why you
> didn't use
> >         >     wxMessageDialog instead of creating wxFormbuilder project
> for such a
> >         >     simple dialog?  It seems to me that wxMessageDialog would
> do the trick
> >         >     as it allows you to change the strings for the Ok and
> Cancel buttons.
> >         >     Other than that, everything else seems fine.
> >         >
> >         >     Cheers,
> >         >
> >         >     Wayne
> >         >
> >         >     On 12/31/2017 4:28 PM, Jon Evans wrote:
> >         >     > For your consideration, a patch is attached that
> implements the above.
> >         >     >
> >         >     >
> >         >     > On Sun, Dec 31, 2017 at 2:24 PM, Jon Evans <
> jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>
> >         <mailto:jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>>
> >         >     > <mailto:jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>
> >         <mailto:jon@xxxxxxxxxxxxx <mailto:jon@xxxxxxxxxxxxx>>>> wrote:
> >         >     >
> >         >     >     I think that getting automatic OpenGL detection and
> recovery working
> >         >     >     for 5.0 might be ambitious.
> >         >     >     Maybe Chris can detail what the next steps are for
> his approach
> >         >     >     there, but in case we want to push that to a later
> release, here's
> >         >     >     what I propose:
> >         >     >
> >         >     >     1) Rename the View menu options based on my proposal
> "Legacy",
> >         >     >     "Modern (Accelerated)", "Modern (Fallback)"
> >         >     >     2) Change PCB_BASE_FRAME::SwitchCanvas to save the
> canvas config
> >         >     >     value after calling UseGalCanvas() rather than
> before.
> >         >     >     3) Show a first-run dialog like the mockup in my
> earlier email, IF
> >         >     >     canvas is not OpenGL and the dialog has not been
> shown before
> >         >     >     44) If user clicks "yes" in the first run dialog,
> then:
> >         >     >         (a) set the config value to prevent the dialog
> from showing again,
> >         >     >         (b) Set the canvas config setting to Cairo (but
> don't switch the
> >         >     >     GAL to Cairo), then
> >         >     >         (c) switch to OpenGL canvas using SwitchCanvas()
> >         >     >
> >         >     >     That way, if the app crashes in step 4c, it should
> come back up as
> >         >     >     Cairo on the next launch (assuming we crash right
> away when trying
> >         >     >     to set up the canvas)
> >         >     >
> >         >     >     Any concerns with the above?
> >         >     >
> >         >     >     -Jon
> >         >     >
> >         >     >
> >         >     >
> >         >     >     On Sun, Dec 31, 2017 at 1:55 PM, Jeff Young <
> jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx> <mailto:jeff@xxxxxxxxx
> >         <mailto:jeff@xxxxxxxxx>>
> >         >     >     <mailto:jeff@xxxxxxxxx <mailto:jeff@xxxxxxxxx>
> <mailto:jeff@xxxxxxxxx
> >         <mailto:jeff@xxxxxxxxx>>>> wrote:
> >         >     >
> >         >     >         +1
> >         >     >
> >         >     >         No menu items.  Just a checkbox for Enable
> Hardware Acceleration
> >         >     >         in Preferences.
> >         >     >
> >         >     >>         On 31 Dec 2017, at 18:36, Andy Peters <
> devel@xxxxxxxxx <mailto:devel@xxxxxxxxx> <mailto:devel@xxxxxxxxx
> >         <mailto:devel@xxxxxxxxx>>
> >         >     >>         <mailto:devel@xxxxxxxxx <mailto:devel@xxxxxxxxx>
> <mailto:devel@xxxxxxxxx
> >         <mailto:devel@xxxxxxxxx>>>> wrote:
> >         >     >>
> >         >     >>>         - In the case of graphics glitches, inform the
> users in the
> >         >     >>>         FAQ/Manual
> >         >     >>>         that they can fall back to software renderer
> in the View menu.
> >         >     >>>         - Don't use the term 'canvas' or 'view'. Just
> 'Enable HW
> >         >     >>>         acceleration’.
> >         >     >>
> >         >     >>         I like that. The fewer technical/programmer
> terms, the better.
> >         >     >
> >         >     >
> >         >     >         _______________________________________________
> >         >     >         Mailing list: https://launchpad.net/~kicad-
> developers
> >         <https://launchpad.net/~kicad-developers>
> >         >     <https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>>
> >         >     >         <https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>
> >         >     <https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>>>
> >         >     >         Post to     : kicad-developers@lists.
> launchpad.net
> >         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> >         >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
> >         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
> >         >     >         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
> >         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> >         >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
> >         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>>
> >         >     >         Unsubscribe :
> >         https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>
> >         >     <https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>>
> >         >     >         <https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>
> >         >     <https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>>>
> >         >     >         More help   :
> >         https://help.launchpad.net/ListHelp
> >         <https://help.launchpad.net/ListHelp>
> >         >     <https://help.launchpad.net/ListHelp
> >         <https://help.launchpad.net/ListHelp>>
> >         >     >         <https://help.launchpad.net/ListHelp
> >         <https://help.launchpad.net/ListHelp>
> >         >     <https://help.launchpad.net/ListHelp
> >         <https://help.launchpad.net/ListHelp>>>
> >         >     >
> >         >     >
> >         >     >
> >         >     >
> >         >     >
> >         >     > _______________________________________________
> >         >     > Mailing list: https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>
> >         >     <https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>>
> >         >     > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> >         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> >         >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
> >         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
> >         >     > Unsubscribe : https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>
> >         >     <https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>>
> >         >     > More help   : https://help.launchpad.net/ListHelp
> >         <https://help.launchpad.net/ListHelp>
> >         >     <https://help.launchpad.net/ListHelp
> >         <https://help.launchpad.net/ListHelp>>
> >         >     >
> >         >
> >         >     _______________________________________________
> >         >     Mailing list: https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>
> >         >     <https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>>
> >         >     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> >         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> >         >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
> >         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
> >         >     Unsubscribe : https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>
> >         >     <https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>>
> >         >     More help   : https://help.launchpad.net/ListHelp
> >         <https://help.launchpad.net/ListHelp>
> >         >     <https://help.launchpad.net/ListHelp
> >         <https://help.launchpad.net/ListHelp>>
> >         >
> >         >
> >
> >         _______________________________________________
> >         Mailing list: https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>
> >         Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> >         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> >         Unsubscribe : https://launchpad.net/~kicad-developers
> >         <https://launchpad.net/~kicad-developers>
> >         More help   : https://help.launchpad.net/ListHelp
> >         <https://help.launchpad.net/ListHelp>
> >
> >
> >
>
From b106f3c9f759a6a86bc51ea75e7937cb3a9753b1 Mon Sep 17 00:00:00 2001
From: Jon Evans <jon@xxxxxxxxxxxxx>
Date: Wed, 3 Jan 2018 22:27:51 -0500
Subject: [PATCH] Add a first-run dialog to encourage user to switch to OpenGL

---
 common/draw_frame.cpp       |  4 ++++
 gerbview/gerbview_frame.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++++
 gerbview/gerbview_id.h      |  3 ---
 gerbview/menubar.cpp        | 12 ++++++------
 include/draw_frame.h        |  3 +++
 include/id.h                |  4 ++++
 pcbnew/basepcbframe.cpp     |  2 +-
 pcbnew/menubar_modedit.cpp  | 12 ++++++------
 pcbnew/menubar_pcbframe.cpp | 12 ++++++------
 pcbnew/pcbframe.cpp         | 45 +++++++++++++++++++++++++++++++++++++++++++++
 pcbnew/pcbnew_id.h          |  3 ---
 11 files changed, 120 insertions(+), 25 deletions(-)

diff --git a/common/draw_frame.cpp b/common/draw_frame.cpp
index e1f79db7b..bd9342155 100644
--- a/common/draw_frame.cpp
+++ b/common/draw_frame.cpp
@@ -76,6 +76,7 @@ static const wxString GalDisplayOptionsKeyword( wxT( "GalDisplayOptions" ) );
 
 const wxChar EDA_DRAW_FRAME::CANVAS_TYPE_KEY[] = wxT( "canvas_type" );
 
+static const wxString FirstRunShownKeyword( wxT( "FirstRunShown" ) );
 
 ///@}
 
@@ -739,6 +740,8 @@ void EDA_DRAW_FRAME::LoadSettings( wxConfigBase* aCfg )
     m_UndoRedoCountMax = aCfg->Read( baseCfgName + MaxUndoItemsEntry,
             long( DEFAULT_MAX_UNDO_ITEMS ) );
 
+    aCfg->Read( baseCfgName + FirstRunShownKeyword, &m_firstRunDialogSetting, 0L );
+
     m_galDisplayOptions->ReadConfig( aCfg, baseCfgName + GalDisplayOptionsKeyword );
 }
 
@@ -753,6 +756,7 @@ void EDA_DRAW_FRAME::SaveSettings( wxConfigBase* aCfg )
     aCfg->Write( baseCfgName + GridColorEntryKeyword,
                  GetGridColor().ToColour().GetAsString( wxC2S_CSS_SYNTAX ) );
     aCfg->Write( baseCfgName + LastGridSizeIdKeyword, ( long ) m_LastGridSizeId );
+    aCfg->Write( baseCfgName + FirstRunShownKeyword, m_firstRunDialogSetting );
 
     if( GetScreen() )
         aCfg->Write( baseCfgName + MaxUndoItemsEntry, long( GetScreen()->GetMaxUndoItems() ) );
diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp
index 45ea60476..6074c924e 100644
--- a/gerbview/gerbview_frame.cpp
+++ b/gerbview/gerbview_frame.cpp
@@ -211,6 +211,51 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
 
     EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = loadCanvasTypeSetting();
 
+    // Nudge user to switch to OpenGL if they are on legacy or Cairo
+    if( ( canvasType != EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ) &&
+        ( m_firstRunDialogSetting < 1 ) )
+    {
+        wxString msg = _( "KiCad can use your graphics card to give you a smoother "
+                          "and faster experience. This option is turned off by "
+                          "default since it is not compatible with all computers.\n\n"
+                          "Would you like to try enabling graphics acceleration?\n\n"
+                          "If you'd like to choose later, select the Modern "
+                          "(Accelerated) graphics mode in the View menu." );
+
+        wxMessageDialog dlg( this, msg, _( "Enable Graphics Acceleration" ),
+                             wxYES_NO );
+
+        dlg.SetYesNoLabels( _( "&Enable Acceleration" ), _( "&No Thanks" ) );
+
+        if( dlg.ShowModal() == wxID_YES )
+        {
+            // Save Cairo as default in case OpenGL crashes
+            saveCanvasTypeSetting( EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO );
+
+            // Switch to OpenGL, which will save the new setting if successful
+            wxCommandEvent evt( wxEVT_MENU, ID_MENU_CANVAS_OPENGL );
+            auto handler = GetEventHandler();
+            handler->ProcessEvent( evt );
+        }
+        else
+        {
+            // If they were on legacy, switch them to Cairo
+
+            if( canvasType == EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE )
+            {
+                wxCommandEvent evt( wxEVT_MENU, ID_MENU_CANVAS_CAIRO );
+                auto handler = GetEventHandler();
+                handler->ProcessEvent( evt );
+            }
+        }
+
+        m_firstRunDialogSetting = 1;
+        SaveSettings( config() );
+    }
+
+    // Canvas may have been updated by the dialog
+    canvasType = loadCanvasTypeSetting();
+
     if( canvasType != EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE )
     {
         if( GetGalCanvas()->SwitchBackend( canvasType ) )
diff --git a/gerbview/gerbview_id.h b/gerbview/gerbview_id.h
index 2e4494b81..035aa716a 100644
--- a/gerbview/gerbview_id.h
+++ b/gerbview/gerbview_id.h
@@ -50,9 +50,6 @@ enum gerbview_ids
 
     ID_MENU_GERBVIEW_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
     ID_MENU_GERBVIEW_SELECT_PREFERED_EDITOR,
-    ID_MENU_CANVAS_LEGACY,
-    ID_MENU_CANVAS_OPENGL,
-    ID_MENU_CANVAS_CAIRO,
 
     ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE,
     ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE,
diff --git a/gerbview/menubar.cpp b/gerbview/menubar.cpp
index fa3f372b7..dc9b745e4 100644
--- a/gerbview/menubar.cpp
+++ b/gerbview/menubar.cpp
@@ -211,28 +211,28 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
     // Canvas selection
     configMenu->AppendSeparator();
 
-    text = AddHotkeyName( _( "Legacy Canva&s" ), GerbviewHokeysDescr,
+    text = AddHotkeyName( _( "Legacy graphic&s" ), GerbviewHokeysDescr,
                           HK_CANVAS_LEGACY );
 
     configMenu->Append(
         new wxMenuItem( configMenu, ID_MENU_CANVAS_LEGACY,
-                        text, _( "Switch the canvas implementation to Legacy" ),
+                        text, _( "Use legacy graphics mode (not all features will be available" ),
                         wxITEM_RADIO ) );
 
-    text = AddHotkeyName( _( "Open&GL Canvas" ), GerbviewHokeysDescr,
+    text = AddHotkeyName( _( "Modern (&Accelerated)" ), GerbviewHokeysDescr,
                           HK_CANVAS_OPENGL );
 
     configMenu->Append(
         new wxMenuItem( configMenu, ID_MENU_CANVAS_OPENGL,
-                        text, _( "Switch the canvas implementation to OpenGL" ),
+                        text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
                         wxITEM_RADIO ) );
 
-    text = AddHotkeyName( _( "&Cairo Canvas" ), GerbviewHokeysDescr,
+    text = AddHotkeyName( _( "Modern (Fallba&ck)" ), GerbviewHokeysDescr,
                           HK_CANVAS_CAIRO );
 
     configMenu->Append(
         new wxMenuItem( configMenu, ID_MENU_CANVAS_CAIRO,
-                        text, _( "Switch the canvas implementation to Cairo" ),
+                        text, _( "Use modern fallback (Cairo) graphics mode" ),
                         wxITEM_RADIO ) );
 
     // Menu miscellaneous
diff --git a/include/draw_frame.h b/include/draw_frame.h
index e3e2cae89..899c9784b 100644
--- a/include/draw_frame.h
+++ b/include/draw_frame.h
@@ -112,6 +112,9 @@ protected:
     /// True shows the drawing border and title block.
     bool    m_showBorderAndTitleBlock;
 
+    /// Key to control whether first run dialog is shown on startup
+    long    m_firstRunDialogSetting;
+
     /// Choice box to choose the grid size.
     wxChoice*       m_gridSelectBox;
 
diff --git a/include/id.h b/include/id.h
index e95ff3f08..1ca5b4dac 100644
--- a/include/id.h
+++ b/include/id.h
@@ -85,6 +85,10 @@ enum main_id
     ID_CONFIG_SAVE,
     ID_CONFIG_READ,
 
+    ID_MENU_CANVAS_LEGACY,
+    ID_MENU_CANVAS_OPENGL,
+    ID_MENU_CANVAS_CAIRO,
+
     ID_PREFERENCES_HOTKEY_START,
     ID_PREFERENCES_HOTKEY_EXPORT_CONFIG,
     ID_PREFERENCES_HOTKEY_IMPORT_CONFIG,
diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp
index c959f8055..54ba21cb7 100644
--- a/pcbnew/basepcbframe.cpp
+++ b/pcbnew/basepcbframe.cpp
@@ -957,8 +957,8 @@ void PCB_BASE_FRAME::SwitchCanvas( wxCommandEvent& aEvent )
         break;
     }
 
-    saveCanvasTypeSetting( canvasType );
     UseGalCanvas( use_gal );
+    saveCanvasTypeSetting( canvasType );
 }
 
 
diff --git a/pcbnew/menubar_modedit.cpp b/pcbnew/menubar_modedit.cpp
index 88cfed0df..637f23dce 100644
--- a/pcbnew/menubar_modedit.cpp
+++ b/pcbnew/menubar_modedit.cpp
@@ -254,28 +254,28 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
     // Add canvas selection
     viewMenu->AppendSeparator();
 
-    text = AddHotkeyName( _( "Legacy Canva&s" ), m_hotkeysDescrList,
+    text = AddHotkeyName( _( "Legacy graphic&s" ), m_hotkeysDescrList,
                           HK_CANVAS_LEGACY );
 
     viewMenu->Append(
         new wxMenuItem( viewMenu, ID_MENU_CANVAS_LEGACY,
-                        text, _( "Switch the canvas implementation to Legacy" ),
+                        text, _( "Use legacy graphics mode (not all features will be available" ),
                         wxITEM_RADIO ) );
 
-    text = AddHotkeyName( _( "Open&GL Canvas" ), m_hotkeysDescrList,
+    text = AddHotkeyName( _( "Modern (&Accelerated)" ), m_hotkeysDescrList,
                           HK_CANVAS_OPENGL );
 
     viewMenu->Append(
         new wxMenuItem( viewMenu, ID_MENU_CANVAS_OPENGL,
-                        text, _( "Switch the canvas implementation to OpenGL" ),
+                        text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
                         wxITEM_RADIO ) );
 
-    text = AddHotkeyName( _( "&Cairo Canvas" ), m_hotkeysDescrList,
+    text = AddHotkeyName( _( "Modern (Fallba&ck)" ), m_hotkeysDescrList,
                           HK_CANVAS_CAIRO );
 
     viewMenu->Append(
         new wxMenuItem( viewMenu, ID_MENU_CANVAS_CAIRO,
-                        text, _( "Switch the canvas implementation to Cairo" ),
+                        text, _( "Use modern fallback (Cairo) graphics mode" ),
                         wxITEM_RADIO ) );
 
     //-------- Place menu --------------------
diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp
index 3085d5a4d..358c510e6 100644
--- a/pcbnew/menubar_pcbframe.cpp
+++ b/pcbnew/menubar_pcbframe.cpp
@@ -559,28 +559,28 @@ void prepareViewMenu( wxMenu* aParentMenu )
 
     aParentMenu->AppendSeparator();
 
-    text = AddHotkeyName( _( "Legacy Canva&s" ), g_Pcbnew_Editor_Hokeys_Descr,
+    text = AddHotkeyName( _( "Legacy graphic&s" ), g_Pcbnew_Editor_Hokeys_Descr,
                           HK_CANVAS_LEGACY );
 
     aParentMenu->Append(
         new wxMenuItem( aParentMenu, ID_MENU_CANVAS_LEGACY,
-                        text, _( "Switch canvas implementation to Legacy" ),
+                        text, _( "Use legacy graphics mode (not all features will be available" ),
                         wxITEM_RADIO ) );
 
-    text = AddHotkeyName( _( "Open&GL Canvas" ), g_Pcbnew_Editor_Hokeys_Descr,
+    text = AddHotkeyName( _( "Modern (&Accelerated)" ), g_Pcbnew_Editor_Hokeys_Descr,
                           HK_CANVAS_OPENGL );
 
     aParentMenu->Append(
         new wxMenuItem( aParentMenu, ID_MENU_CANVAS_OPENGL,
-                        text, _( "Switch canvas implementation to OpenGL" ),
+                        text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
                         wxITEM_RADIO ) );
 
-    text = AddHotkeyName( _( "&Cairo Canvas" ), g_Pcbnew_Editor_Hokeys_Descr,
+    text = AddHotkeyName( _( "Modern (Fallba&ck)" ), g_Pcbnew_Editor_Hokeys_Descr,
                           HK_CANVAS_CAIRO );
 
     aParentMenu->Append(
         new wxMenuItem( aParentMenu, ID_MENU_CANVAS_CAIRO,
-                        text, _( "Switch canvas implementation to Cairo" ),
+                        text, _( "Use modern fallback (Cairo) graphics mode" ),
                         wxITEM_RADIO ) );
 }
 
diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp
index c8accb7f9..f577cacec 100644
--- a/pcbnew/pcbframe.cpp
+++ b/pcbnew/pcbframe.cpp
@@ -470,6 +470,51 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
 
     EDA_DRAW_PANEL_GAL::GAL_TYPE canvasType = loadCanvasTypeSetting();
 
+    // Nudge user to switch to OpenGL if they are on legacy or Cairo
+    if( ( canvasType != EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ) &&
+        ( m_firstRunDialogSetting < 1 ) )
+    {
+        wxString msg = _( "KiCad can use your graphics card to give you a smoother "
+                          "and faster experience. This option is turned off by "
+                          "default since it is not compatible with all computers.\n\n"
+                          "Would you like to try enabling graphics acceleration?\n\n"
+                          "If you'd like to choose later, select the Modern "
+                          "(Accelerated) graphics mode in the View menu." );
+
+        wxMessageDialog dlg( this, msg, _( "Enable Graphics Acceleration" ),
+                             wxYES_NO );
+
+        dlg.SetYesNoLabels( _( "&Enable Acceleration" ), _( "&No Thanks" ) );
+
+        if( dlg.ShowModal() == wxID_YES )
+        {
+            // Save Cairo as default in case OpenGL crashes
+            saveCanvasTypeSetting( EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO );
+
+            // Switch to OpenGL, which will save the new setting if successful
+            wxCommandEvent evt( wxEVT_MENU, ID_MENU_CANVAS_OPENGL );
+            auto handler = GetEventHandler();
+            handler->ProcessEvent( evt );
+        }
+        else
+        {
+            // If they were on legacy, switch them to Cairo
+
+            if( canvasType == EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE )
+            {
+                wxCommandEvent evt( wxEVT_MENU, ID_MENU_CANVAS_CAIRO );
+                auto handler = GetEventHandler();
+                handler->ProcessEvent( evt );
+            }
+        }
+
+        m_firstRunDialogSetting = 1;
+        SaveSettings( config() );
+    }
+
+    // Canvas may have been updated by the dialog
+    canvasType = loadCanvasTypeSetting();
+
     if( canvasType != EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE )
     {
         if( GetGalCanvas()->SwitchBackend( canvasType ) )
diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h
index 8c1bf27c8..41184794e 100644
--- a/pcbnew/pcbnew_id.h
+++ b/pcbnew/pcbnew_id.h
@@ -299,9 +299,6 @@ enum pcbnew_ids
 
     ID_PCB_GEN_CMP_FILE,
     ID_MENU_PCB_SHOW_3D_FRAME,
-    ID_MENU_CANVAS_LEGACY,
-    ID_MENU_CANVAS_OPENGL,
-    ID_MENU_CANVAS_CAIRO,
     ID_PCB_USER_GRID_SETUP,
     ID_PCB_GEN_BOM_FILE_FROM_BOARD,
     ID_PCB_LIB_WIZARD,
-- 
2.14.1


Follow ups

References