From f3b14410eb69cfcba356bb0df749fb1db43fcde9 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 25 Feb 2014 19:31:55 +0000 Subject: [PATCH] .cosmetics git-svn-id: svn://ultimatepp.org/upp/trunk@6954 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlCore/GtkCtrl.cpp | 1 - uppsrc/CtrlCore/GtkWnd.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/uppsrc/CtrlCore/GtkCtrl.cpp b/uppsrc/CtrlCore/GtkCtrl.cpp index 495e66614..d774672ca 100644 --- a/uppsrc/CtrlCore/GtkCtrl.cpp +++ b/uppsrc/CtrlCore/GtkCtrl.cpp @@ -42,7 +42,6 @@ String GuiPlatformGetKeyDesc(dword key) { K_DELTA|GDKEY(comma), "[,]" }, { K_DELTA|GDKEY(period), "[.]" }, { K_DELTA|GDKEY(underscore), "[/]" }, - { 0, NULL } }; const Tuple2 *x = FindTuple(nkey, __countof(nkey), key); return x ? String(x->b) : String(); diff --git a/uppsrc/CtrlCore/GtkWnd.cpp b/uppsrc/CtrlCore/GtkWnd.cpp index 4c0d7af6c..148b1db3d 100644 --- a/uppsrc/CtrlCore/GtkWnd.cpp +++ b/uppsrc/CtrlCore/GtkWnd.cpp @@ -294,7 +294,7 @@ Rect Ctrl::GetPrimaryWorkArea() int primary = gdk_screen_get_primary_monitor(gdk_screen_get_default()); Array rc; GetWorkArea(rc); - return primary < rc.GetCount() ? rc[primary] : GetVirtualScreenArea(); + return primary >= 0 && primary < rc.GetCount() ? rc[primary] : GetVirtualScreenArea(); } Rect Ctrl::GetPrimaryScreenArea()