View Single Post
Old 01-22-2016, 09:29 AM   #34
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,708
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Okay,
In the clipboard history code of Sigil, anytime the clipboard changes, a changed() signal is sent. So as you highlight code in X11 it is constantly sending this signal where the current contents of the clipboard are compared against the highlighted text so far and added to the clipboard if and only if there is something in the system clipboard.

There is a screen to filter these signals out by mode (data or selection) but it appears to fail for x11. This only happen for X11 because it has a selection mode. On other systems you must hit copy not simply highlight something to activate the clipboard. I will see if the datachanged signal with proper filter would work better on Linux. The docs on changed(mode) signal are obviously incorrect for Linux or Qt has a bug since the mode check on the changed() signal in Sigil should be preventing this but obviously is not.

I will post something to try and fix this tomorrow for linux users to try. I'm off to sleep now.

KevinH
I think the code is successfully filtering out the x11 selection signal (at least qDebug printouts indicate no x11 selection change events are getting past the
Code:
if (mode != QClipboard::Clipboard) {
        return;
    }
test in ClipboardHistorySelection.cpp), but I think that filtering those selection events is actually what's causing the performance bottleneck. I could be all wet, though.
DiapDealer is offline   Reply With Quote