aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/ScintillaGTK.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2003-02-26 10:52:16 +0000
committernyamatongwe <devnull@localhost>2003-02-26 10:52:16 +0000
commit4e366fef3d0fb1b95386da1b9cb9416b10689a09 (patch)
treeec8b74ebe57bc1855cb5b30f1560637a463b1bdc /gtk/ScintillaGTK.cxx
parentcc16b392bf1e785095f66f4cc693218c3cf8e24f (diff)
downloadscintilla-mirror-4e366fef3d0fb1b95386da1b9cb9416b10689a09.tar.gz
Patch from Stephan Deibel to prevent Scintilla disrupting the primary
selection at creation time.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-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() {