When opening a table or a query/view from the main database window, the new window opens in the foreground, but focus switches immediately back to the main database window, this coming to the foreground and pushing the newly opened window to the background. Up to OpenOffice 2.4.3 the newly opened window stayed in the foreground and kept the focus. This new behavior is seen with LibO 3.3.0 and 3.3.1. It requires an additional click to the new window to activate it.
I don't reproduce this problem with LibO 332 (under Windows XP SP3) and LibO 340 (under Windows 7 SP1).
When opening a table in the main database window, a new window opens in foreground and focus remains on this window. The main database window remains in background.
But maybe I did not understand the problem :-))
Maybe this is also due to the backend, so further details are here:
Database is an ODB file connected to an ODBC database (sqlite3odbc driver).
Open the database, switch to table/query view (left pane)
double click onto one of the tables/queries or select it with mouse or cursor and press return: a new window opens, but immediately the database window returns to the foreground and has focus
select table/query, and then open it via either right click menu: Open or main menu: Edit->Open Database Object, then the new windows stays in the foreground
The faulty behavior is only seen after double click or return key. I see this with:
LibO 3.3.2 on WinXP SP3
LibO 3.3.2 on Ubuntu Lucid
But: when I open the dbase based biblio database, I cannot reproduce this behavior on the same systems, but I can reproduce it with all my ODBC based databases.
I can not confirm this behaviour in LibO 3.4 on MacOSX with a mysql ODBC database connection. The table window and the query window appear in the foreground over the top of the ODB main window when I double-click on one of the table/query entries.
I tested with :
- an integrated HSQLDB database,
- a MySQL database (direct connexion).
In the two cases, it's ok.
I opened a table by :
- double click,
- select and press return,
- right click and open,
- select and Edit > Open Database Object;
It's correct in all cases (table window is in foreground with focus).
Bug 42612 and this one are *partially* duplicates.
thanks for picking up this bug. I read bug 42612, and it seems to me it is indeed a duplicate of this one. With preview disabled my tables open in the foreground as expected, and I already suspected a later event to the main window returns the foceus to this one but didn't think of the preview pane (why should it be redrawn, anyway?).
I already wondered why nobody else seemed to be able to reproduce it. For me it happens on Linux and Windows, in all versions from 3.3.0 up to 3.4.4. Oddly enough, this did not happen with a newly created database but with all production databases in use (using a sqliteodbc backend), but now I see new databases are created with preview disabled - that explains it.
*** Bug 42612 has been marked as a duplicate of this bug. ***
This is a side-effect of how oo.org issue i#99971 (https://issues.apache.org/ooo/show_bug.cgi?id=99971) was fixed (commit 23740dc4a7e81c8c5129e26fe579cf81363d6388).
From a Unix/X11-centric POV, it should be completely reverted, but that will get Microsoft Windows users in arms, so we need a more precise fix for this bug.
Setting preference org.openoffice.Office.Common/View/NewDocumentHandling/ForceFocusAndToFront to false fixes this bug (on X11/GNU/Linux). On X11, it also does not reintroduce i#99971. OTOH, as far is I understand, this would reintroduce i#99971 on MS Windows.
So, I intend to:
1) Make all/most the "steal focus" behaviour happen only on Microsoft Windows, and possibly other platforms that need it, but not on Unix/X11.
2) To fix this bug on MS Windows, too, make showPreview somehow block the effect of ForceFocusAndToFront.
(In reply to comment #9)
> 2) To fix this bug on MS Windows, too, make showPreview somehow block the
> effect of ForceFocusAndToFront.
Well, that was easier than expected. Commit 88285f84bdf54147ee5238e97d0d805fa1c127c1 in master (LO 3.5).
I'm marking this as fixed, since IMHO it is not an important enough bug to apply the fix to libreoffice-3-4; if someone disagrees and would like it fixed in 3.4.5, feel free to seek review on the development mailing list.