aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorUnknown <nyamatongwe@gmail.com>2013-06-05 22:39:05 +1000
committerUnknown <nyamatongwe@gmail.com>2013-06-05 22:39:05 +1000
commitee13aae48194ac55f08fd0186f51c52cea29e15d (patch)
tree610289be374867df67e45f55c5a364e1f3b293a0
parent78c68eb0882e2fb37ecb1693466da128e63f5b39 (diff)
parent6e29602a6c893a998dc78a9f8d96eb0d70c5a12c (diff)
downloadscintilla-mirror-ee13aae48194ac55f08fd0186f51c52cea29e15d.tar.gz
Merged with GTK+ change.
-rw-r--r--win32/PlatWin.cxx4
-rw-r--r--win32/ScintillaWin.cxx12
2 files changed, 10 insertions, 6 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 0eb377ed4..f1d6a4fcd 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -2133,7 +2133,7 @@ class ListBoxX : public ListBox {
HWND GetHWND() const;
void AppendListItem(const char *text, const char *numword);
- void AdjustWindowRect(PRectangle *rc) const;
+ static void AdjustWindowRect(PRectangle *rc);
int ItemHeight() const;
int MinClientWidth() const;
int TextOffset() const;
@@ -2496,7 +2496,7 @@ void ListBoxX::SetList(const char *list, char separator, char typesep) {
SetRedraw(true);
}
-void ListBoxX::AdjustWindowRect(PRectangle *rc) const {
+void ListBoxX::AdjustWindowRect(PRectangle *rc) {
RECT rcw = RectFromPRectangle(*rc);
::AdjustWindowRectEx(&rcw, WS_THICKFRAME, false, WS_EX_WINDOWEDGE);
*rc = PRectangle(rcw.left, rcw.top, rcw.right, rcw.bottom);
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index dca98d5ed..27b19cc8c 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -217,8 +217,10 @@ class ScintillaWin :
virtual void Initialise();
virtual void Finalise();
+#if defined(USE_D2D)
void EnsureRenderTarget();
void DropRenderTarget();
+#endif
HWND MainHWND();
static sptr_t DirectFunction(
@@ -404,15 +406,18 @@ void ScintillaWin::Finalise() {
ScintillaBase::Finalise();
SetTicking(false);
SetIdle(false);
+#if defined(USE_D2D)
DropRenderTarget();
+#endif
::RevokeDragDrop(MainHWND());
if (SUCCEEDED(hrOle)) {
::OleUninitialize();
}
}
-void ScintillaWin::EnsureRenderTarget() {
#if defined(USE_D2D)
+
+void ScintillaWin::EnsureRenderTarget() {
if (!renderTargetValid) {
DropRenderTarget();
renderTargetValid = true;
@@ -454,18 +459,17 @@ void ScintillaWin::EnsureRenderTarget() {
// need to be recreated.
DropGraphics(false);
}
-#endif
}
void ScintillaWin::DropRenderTarget() {
-#if defined(USE_D2D)
if (pRenderTarget) {
pRenderTarget->Release();
pRenderTarget = 0;
}
-#endif
}
+#endif
+
HWND ScintillaWin::MainHWND() {
return reinterpret_cast<HWND>(wMain.GetID());
}