aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RadTerminal.cpp20
-rw-r--r--RadTerminalDll.vcxproj2
2 files changed, 15 insertions, 7 deletions
diff --git a/RadTerminal.cpp b/RadTerminal.cpp
index 5dae48e..57842c5 100644
--- a/RadTerminal.cpp
+++ b/RadTerminal.cpp
@@ -219,7 +219,7 @@ extern "C" {
if (fontFace != NULL)
rtc.strFontFace = std::tstring(fontFace);
- if (command != NULL)
+ if (command != NULL && wcslen(command) > 0)
rtc.strCommand = std::tstring(command);
if (working_directory != NULL)
@@ -240,7 +240,7 @@ extern "C" {
if (darkMode)
{
SetWindowTheme(hRet, L"DarkMode_Explorer", NULL); // Needed for scrollbar
- AllowDarkModeForWindow(hRet, true);
+ //AllowDarkModeForWindow(hRet, true);
}
return hRet;
@@ -998,9 +998,17 @@ void RadTerminalWindowOnPaint(HWND hWnd)
HBITMAP hbitmap = CreateCompatibleBitmap(hdc, ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top);
HBITMAP hbitmapold = SelectBitmap(hmemdc, hbitmap);
- HBRUSH hBrush = (HBRUSH) GetClassLongPtr(hWnd, GCLP_HBRBACKGROUND);
- if (hBrush != NULL)
- FillRect(hmemdc, &ps.rcPaint, hBrush);
+ //HBRUSH hBrush = (HBRUSH) GetClassLongPtr(hWnd, GCLP_HBRBACKGROUND);
+ //if (hBrush != NULL)
+ // FillRect(hmemdc, &ps.rcPaint, hBrush);
+ COLORREF bkgd = RGB(color_default_pallette[TSM_COLOR_BACKGROUND][0],
+ color_default_pallette[TSM_COLOR_BACKGROUND][1],
+ color_default_pallette[TSM_COLOR_BACKGROUND][2]);
+ HBRUSH hbkgd = CreateSolidBrush(bkgd);
+ if (hbkgd != NULL) {
+ FillRect(hmemdc, &ps.rcPaint, hbkgd);
+ DeleteObject(hbkgd);
+ }
tsm_screen_draw_data draw = {};
draw.hdc = hmemdc;
@@ -1529,7 +1537,7 @@ LRESULT CALLBACK RadTerminalWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
HANDLE_MSG(hWnd, WM_RBUTTONDOWN, RadTerminalWindowOnRButtonDown);
HANDLE_MSG(hWnd, WM_TIMER, RadTerminalWindowOnTimer);
HANDLE_MSG(hWnd, WM_SIZE, RadTerminalWindowOnSize);
- HANDLE_MSG(hWnd, WM_SIZING, RadTerminalWindowOnSizing);
+ //HANDLE_MSG(hWnd, WM_SIZING, RadTerminalWindowOnSizing);
HANDLE_MSG(hWnd, WM_VSCROLL, RadTerminalWindowOnVScroll);
HANDLE_MSG(hWnd, WM_DROPFILES, RadTerminalWindowOnDropFiles);
HANDLE_MSG(hWnd, WM_COMMAND, RadTerminalWindowOnCommand);
diff --git a/RadTerminalDll.vcxproj b/RadTerminalDll.vcxproj
index cfb481d..cb8b6c4 100644
--- a/RadTerminalDll.vcxproj
+++ b/RadTerminalDll.vcxproj
@@ -87,7 +87,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions);BUILD_AS_DLL</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>