#2483 closed defect (fixed)
Problem with focus of the search dialog
Reported by: | Owned by: | lasgouttes | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | search | Version: | 1.4.0 |
Severity: | major | Keywords: | |
Cc: | younes@… |
Description
1) Open a document
2) Ctrl-F, search for a word
3) Click in the text
4) Ctrl-F again. The search dialog comes to the foreground but does not have
focus. You have to click in it to be able to enter a new search phrase.
Could it be possible to give back focus to the search dialog ?
I'm using the Qt2 frontend.
Cheers,
Charles
Change History (16)
comment:1 by , 18 years ago
op_sys: | Linux → All |
---|---|
Summary: | Problem with focus of the search dialog → Problem with focus of the search dialog |
comment:2 by , 18 years ago
comment:4 by , 17 years ago
Keywords: | fixedintrunk added |
---|
Fixed in trunk at revision 17381. I guess the same fix could apply to 1.4.
comment:5 by , 17 years ago
Milestone: | → 1.4.5 |
---|
comment:6 by , 17 years ago
I cannot reproduce the bug in 1.4. I'd like to see what happens before applying it
comment:7 by , 17 years ago
Severity: | minor → major |
---|
Under windows, the bug is even more serious in 1.4: When you type "Ctrl+f" and
if the search dialog is already opened somewhere in the background, it is put to
the the foreground but does not have focus at all as the original report says.
This is a major bug IMO. Maybe you can backport part of the commit 17166
(relevant part pasted below).
In 1.5, the search dialog had the focus but not the edit box within the dialog.
So I guess my fix to 1.5 does not apply to 1.4 then.
Author: younes
Date: Tue Feb 13 19:20:07 2007
New Revision: 17166
URL: http://www.lyx.org/trac/changeset/17166
Log:
Fix #3225 and maybe others as well.
- QDialogView::show(): also setFocus() when raising or showing a window.
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/QDialogView.C?rev=17166
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/QDialogView.C (original)
+++ lyx-devel/trunk/src/frontends/qt4/QDialogView.C Tue Feb 13 19:20:07 2007
@@ -61,8 +61,10 @@
if (form()->isVisible()) {
form()->raise();
form()->activateWindow();
+ form()->setFocus();
} else {
form()->show();
+ form()->setFocus();
}
}
comment:8 by , 17 years ago
So it is probably a windows only problem. On linux, I cannot put the window in
the background anyway...
It is strange that we need to set the focus, it should be the job of the window
manager, isn't it?
comment:9 by , 17 years ago
Charles, could you try the patch of comment 5 with 1.4 and see whether
it helps? Alternatively, what are the KDE settings I need to have to
see the problem?
comment:10 by , 17 years ago
No. With the patch Number 5 applied the problem is still there.
This patch works for me :
Index: QDialogView.C
===================================================================
--- QDialogView.C (révision 17647)
+++ QDialogView.C (copie de travail)
@@ -58,8 +58,12 @@
if (form()->isVisible()) {
form()->raise();
+ form()->setActiveWindow();
+ form()->setFocus();
} else {
form()->show();
+ form()->setActiveWindow();
+ form()->setFocus();
}
}
Hehe, my first patch...
comment:11 by , 17 years ago
And are you sure this has no bad side-effects?
Am I right that this should be simplified as
if (form()->isVisible()) {
form()->raise();
} else {
form()->show();
}
+ form()->setActiveWindow();
+ form()->setFocus();
}
comment:15 by , 15 years ago
Keywords: | fixedintrunk removed |
---|
comment:16 by , 9 years ago
Milestone: | 1.4.x |
---|
Remove milestone 1.4.x, which is not a real milestone anyway.
Confirmed with Qt4 in trunk.