Vanishing cursor in SQL editor - propose quick and dirty fix

Поиск
Список
Период
Сортировка
От Tim Booth
Тема Vanishing cursor in SQL editor - propose quick and dirty fix
Дата
Msg-id 1077809094.7845.565.camel@ivpcp044.nerc-oxford.ac.uk
обсуждение исходный текст
Ответы Re: Vanishing cursor in SQL editor - propose quick  (Andreas Pflug <pgadmin@pse-consulting.de>)
Список pgadmin-hackers
Hi,

I love PGAdminIII, and use it extensively on my Redhat Linux box.  I'm
currently using a CVS build as it fixes a significant crashing situation
over the stable release.  However, I find the disappearence of the
cursor/caret in the SQL editor very annoying.

An hour or so of poking has led me into the labyrinth of code which is
the wxWindows focus handling mechanism.  I really don't have the time or
inclination to debug that so here is my hacky fix:

In the file contrib/src/stc/ScintillaWX.cpp, line 637, change the left
mouse click callback as follows:

...
void ScintillaWX::DoLeftButtonDown(Point pt, unsigned int curTime, bool
shift, bool ctrl, bool alt) {
    ButtonDown(pt, curTime, shift, ctrl, alt);

           
    //Hack to try and reclaim the caret:
    if(!hasFocus) DoGainFocus();
}
...
ie - we force a focus event and hence redraw the caret.

The added line should never be called, since you should never get a left
click without getting focus, so on the plus side this patch should not
break anything if wxWindows gets fixed properly.  Also, the wxWindows
build you use has already been forked, so I don't think it would be
polluting good code to add this.

Anyway, whoever maintains this code, take it or leave it.

TIM


В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Jean-Michel POURE
Дата:
Сообщение: New Finnish translation
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: Vanishing cursor in SQL editor - propose quick