Feature #19

Urgent hint (X11) & Flashing (win) for TopWindow

Added by Jan Dolinár over 8 years ago. Updated over 8 years ago.

Status:ApprovedStart date:01/28/2011
Priority:HighDue date:
Assignee:Jan Dolinár% Done:

100%

Category:-Spent time:-
Target version:-

Description

U++ provides no way how to set the window into the "flashing state" that is often used in applications (e.g. IM apps) to attract user attention in an unobtrusive manner (certainly less disturbing than bringing the window to foreground).

So I propose to add methods Urgent(bool b = true) and IsUrgent() to TopWindow.

urgenthint.zip (11.5 KB) Jan Dolinár, 01/28/2011 01:50 PM

TopWinX11.cpp Magnifier (9.79 KB) Jan Dolinár, 01/31/2011 02:09 PM

History

#1 Updated by Jan Dolinár over 8 years ago

  • File urgenthint.zip added
  • Assignee changed from Jan Dolinár to Miroslav Fidler

Here are the changed files for testing. I believe it is now ready for inclusion. What do you think?

#2 Updated by Miroslav Fidler over 8 years ago

  • Status changed from Ready for QA to In Progress

#3 Updated by Miroslav Fidler over 8 years ago

  • Assignee changed from Miroslav Fidler to Jan Dolinár
  • Priority changed from Normal to High

Was not working in Win7. There I was able to fix it.

Is not working in ubuntu/gnome. Unable to fix it there...

Testing with this

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN
{
    TopWindow win, win2;
    win.Title("xxx");
    win.Open();
    win2.OpenMain();
    win2.Run();
    win.Urgent();
    win2.Run();
}

It is committed to the trunk now, it is possible that the problem is only Gnome specific... Well, at least it works in Win, but could investigate why it does not work in Ubuntu please?

#4 Updated by Jan Dolinár over 8 years ago

  • File TopWinX11.cppMagnifier added
  • Assignee changed from Jan Dolinár to Miroslav Fidler
  • % Done changed from 0 to 90

Thanks for the Win7 patch.

It appears that Gnome (Metacity more precisely) ignores XUrgencyHint and uses _NET_WM_STATE_DEMANDS_ATTENTION instead. In my Xfce it works just fine. Attached code should fix it for most window managers, by using both ways. Unfortunately I don't have any distro with Gnome right now and virtualization stopped working (crashes my computer, grrr :-/ )... Can you test it yourself? Thanks.

Honza

#5 Updated by Andrei Natanael Cosma over 8 years ago

Miroslav Fidler wrote:

Was not working in Win7. There I was able to fix it.

Is not working in ubuntu/gnome. Unable to fix it there...

Testing with this

[...]

It is committed to the trunk now, it is possible that the problem is only Gnome specific... Well, at least it works in Win, but could investigate why it does not work in Ubuntu please?

It works for me in Ubuntu, it flashes the taskbar entry. If you test with ubuntu default theme you will not see it flashing (maybe there is a theme issue) but if you test with clearlooks theme the taskbar entry changes to blue/white/blue etc.

#6 Updated by Jan Dolinár over 8 years ago

  • % Done changed from 90 to 100

Andrei Natanael Cosma wrote:

It works for me in Ubuntu, it flashes the taskbar entry. If you test with ubuntu default theme you will not see it flashing (maybe there is a theme issue) but if you test with clearlooks theme the taskbar entry changes to blue/white/blue etc.

If it works with one theme and not the other than the problem is probably not in the code but in the theme. I think that the change can go to svn now, Mirek could you commit it please?

#7 Updated by Miroslav Fidler over 8 years ago

  • Status changed from In Progress to Ready for QA
  • Assignee changed from Miroslav Fidler to Jan Dolinár

..make a last check, then approve the task... :)

#8 Updated by Jan Dolinár over 8 years ago

  • Status changed from Ready for QA to Approved

Also available in: Atom PDF