aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2003-02-26 10:52:16 +0000
committernyamatongwe <unknown>2003-02-26 10:52:16 +0000
commitc9c3bb9057bea039e3fa6da06db1f07b631f5df7 (patch)
treeec8b74ebe57bc1855cb5b30f1560637a463b1bdc
parent83ba7c3162333140eadcefd1075e10a0a690da62 (diff)
downloadscintilla-mirror-c9c3bb9057bea039e3fa6da06db1f07b631f5df7.tar.gz
Patch from Stephan Deibel to prevent Scintilla disrupting the primary
selection at creation time.
-rw-r--r--gtk/ScintillaGTK.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 403c05e23..28013d48e 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -897,8 +897,9 @@ void ScintillaGTK::AddToPopUp(const char *label, int cmd, bool enabled) {
}
bool ScintillaGTK::OwnPrimarySelection() {
- return (gdk_selection_owner_get(GDK_SELECTION_PRIMARY)
- == GTK_WIDGET(PWidget(wMain))->window);
+ return ((gdk_selection_owner_get(GDK_SELECTION_PRIMARY)
+ == GTK_WIDGET(PWidget(wMain))->window) &&
+ (GTK_WIDGET(PWidget(wMain))->window != NULL));
}
void ScintillaGTK::ClaimSelection() {