Bug 122070 - Focus-stealing prevention problem
Summary: Focus-stealing prevention problem
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-15 23:12 UTC by Maciej Pilichowski
Modified: 2012-04-09 20:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Javascript script for opening several pages (1.75 KB, text/html)
2006-03-25 08:53 UTC, Maciej Pilichowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pilichowski 2006-02-15 23:12:20 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    SuSE RPMs

FOLLOWING:
Current "focus follows mouse" works almost perfectly for me. However it should be second, very similar policy "focus follows mouse MOVEMENT". Here is an example. I have two windows, maximized. The front one has the focus. Now I resize it to previous size via _keyboard_. If mouse cursor is placed above the background window the front window loses focus. Note that I din't touch the mouse.
  So focus in that /new/ scenario should respond only to mouse movement, not mouse placement.

STEALING:
Please add several named option for stealing /or rather not-stealing/ focus by pop-up dialogs, warnings and errors. Typical very annoying /it happens daily/ case is when I run the Konqueror to fetch several pages for me, while downloading them, I switch to Kate to write something and when I am writing text the error-box from Konqueror saying "cannot connect to www.dilbert.com" pops up (*) and disturbs my writing.
  My current setting for stealing focus is normal, I cannot set it higher because then launching new apps is done in the background /in "high" mode for stealing/.

(*) another thing this is quite surprising since no connection shouldn't be such a big deal to show dialog-box. But... it only happens at dilbert site so I am not sure whose fault it is.
Comment 1 Thiago Macieira 2006-02-19 22:03:42 UTC
For the future: one wish per request, please.
Comment 2 Lubos Lunak 2006-02-24 15:11:55 UTC
First half is a duplicate of bug #92290. Second is apparently a bug in focus-stealing prevention, but I cannot reproduce it, please provide exact steps how to reproduce.

Comment 3 Maciej Pilichowski 2006-02-24 15:34:46 UTC
> For the future: one wish per request, please. 
> First half is a duplicate of bug #92290. 

My mistakes! I am sorry.

> Second is apparently a bug in focus-stealing prevention, but I cannot 
> reproduce it, please provide exact steps how to reproduce. 

I have 128kbs internet line and every day at the morning I open my start page -- tiny Javascript which opens several tabs with various addresses /if necessary I can add the code here/.
Then I switch to KMail and read new mail while Konqueror downloads the pages. Depending on pages availability, connection speed, etc etc. some pages may not be opened but if that is the case Konqueror shows normal message in the tab window. The only exception I know is:
http://www.dilbert.com/comics/dilbert/archive/index.html

If this page is unavailable or partially unavailable the error message box is shown /as the top window/.
 
I can add the picture or text of the message box if this could help?

PS. I use tab-mode view, not separate windows mode.
Comment 4 Lubos Lunak 2006-02-27 13:44:33 UTC
A picture could perhaps help, but I'm afraid "make sure you have poor connection to dilbert.com" may be somewhat difficult to reproduce.
Comment 5 Maciej Pilichowski 2006-03-01 08:07:07 UTC
Of course now, exactly as Murphy's Law states, I cannot get the exact error.
 
> A picture could perhaps help, but I'm afraid "make sure you have poor
> connection to dilbert.com" may be somewhat difficult to reproduce. 

I got error while connecting to another site. It happens while I open many connections /mail, news reader, a lot of pages/. The error dialog box title: "Error - Konqueror", the messsage: "Connection to host www.merlin.com.pl is broken". Judging from the icon it is a Qt error dialog box.

It should be put at the page context like other errors.
Comment 6 Maciej Pilichowski 2006-03-25 08:53:43 UTC
Created attachment 15287 [details]
Javascript script for opening several pages

Once again about stealing focus problem. Here is how to reproduce the bug /if
you have fast internet connection modify the included JS script to open even
more pages at once/.

Run Konqueror. Enable popups so JS script could open several tabs. Maximize.
Run KMail. Maximize. Switch to Konqueror. Open the included html page. You can
stay here for a second to ensure script works ok.
Switch to KMail. Start composer /new mail/. Wait for a minute. Close composer.
In front of KMail is an error-box from Konqueror /if there is no error-box and
all pages loaded successfully you have fast connection, modify the script/.
Comment 7 FiNeX 2010-10-10 13:30:43 UTC
Hi Maciej, I'm not able to reproduce this bug using KDE 4.5.2. would you like to check it and tell us if the problem has been solved since the KDE 3 era? Thanks!
Comment 8 Thomas Lübking 2012-04-09 20:19:24 UTC
second part will no longer occur since
a) dilbert.com has a 404 page
b) i doubt konqueror opens a dialog to hint a url cannot be connected

the focus stealing is timing related, ie. if you type fast into kwrite, no dialog should gain focus, but if you just sit in front of kwrite, mumbling about the blank page, you're not really active in kwin's POV, so the dialog is handed the focus.

you can use a rule to increase the focus policy for those dialogs, but i guess it falls into the categories of bug #110543 ie. windows shall not gain focus, but only raise on top of the stack?

(i'll nevertheless close this one as worksforme through the rules, since in doubt it would be a dupe)