]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Application.C
Fix bug 3101 and 3108
[lyx.git] / src / frontends / Application.C
index a1dbae1b6d29b5c46d669816ba3198171c1c5c79..35eeaa9418dcf26bedfec3180d63a32eed2263d0 100644 (file)
@@ -39,6 +39,7 @@ namespace frontend {
 
 
 Application::Application(int &, char **)
+       : current_view_(0)
 {
        // FIXME: please confirm: with unicode, I think initEncoding()
        // is not needed anymore!
@@ -49,11 +50,11 @@ Application::Application(int &, char **)
 
 
 LyXView & Application::createView(unsigned int width,
-                                                                 unsigned int height,
-                                                                 int posx, int posy,
-                                                                 bool maximize,
-                                                                 unsigned int iconSizeXY,
-                                                                 const std::string & geometryArg)
+                                 unsigned int height,
+                                 int posx, int posy,
+                                 bool maximize,
+                                 unsigned int iconSizeXY,
+                                 const std::string & geometryArg)
 {
        LyXView & view = gui().createRegisteredView();
        int view_id = view.id();
@@ -64,6 +65,7 @@ LyXView & Application::createView(unsigned int width,
 
        view.init();
        view.setGeometry(width, height, posx, posy, maximize, iconSizeXY, geometryArg);
+       view.setFocus();
 
        setCurrentView(view);