Changeset 64

Show
Ignore:
Timestamp:
09/22/06 01:05:38 (2 years ago)
Author:
dmik
Message:

Psi: Fixed "bring to front" functionality:
- Roster window took the keyboard focus if the "Raise Roster Window On New Event" was set.
- [Win32] bringToFront() didn't actually put the window on top of the active window (as on all other platforms).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • psi/trunk/src/common.cpp

    r55 r64  
    19511951#ifdef Q_WS_WIN 
    19521952        w->raise(); 
    1953         if (grabFocus) 
     1953        if (grabFocus) { 
    19541954                w->setActiveWindow(); 
     1955        } else { 
     1956                if (GetTopWindow(NULL) != w->winId()) {  
     1957                        // On Win32, raise() cannot move a window on top of the currently 
     1958                        // active window w/o making the former active. To overcome this, 
     1959                        // we use a trick by first making the window floating on top and 
     1960                        // then restoring the normal behavior.  
     1961                        SetWindowPos(w->winId(), HWND_TOPMOST, 0, 0, 0, 0, 
     1962                                                 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); 
     1963                        SetWindowPos(w->winId(), HWND_NOTOPMOST, 0, 0, 0, 0, 
     1964                                                 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); 
     1965                } 
     1966        } 
    19551967#else 
    19561968        if(grabFocus) 
  • psi/trunk/src/mainwin.cpp

    r57 r64  
    10881088#endif 
    10891089 
    1090 #if defined(Q_WS_WIN) 
     1090/// @todo (r=dmik) I don't fully understand what is this code good for, but 
     1091//      at least it doesn't do what it should (for example, if the roster window is 
     1092//      minimized, it won't be shown). Instead we use bringToFront() just like on 
     1093//      any other platform (the *fixed* version of bringToFront() seems to work ok). 
     1094#if 0 && defined(Q_WS_WIN) 
    10911095#include<windows.h> 
    10921096void MainWin::showNoFocus() 
     
    11721176void MainWin::showNoFocus() 
    11731177{ 
    1174         bringToFront(this); 
    1175 
    1176  
    1177 #endif 
     1178#if defined(QT_ACCESSIBILITY_SUPPORT) 
     1179        QAccessible::updateAccessibility( this, 0, QAccessible::ObjectShow ); 
     1180#endif 
     1181        bringToFront(this, false); 
     1182
     1183 
     1184#endif 
  • psi/trunk/src/options/opt_events.cpp

    r2 r64  
    4545                "Set this option if you want them to popup anyway.")); 
    4646        QWhatsThis::add(d->ck_raise, 
    47                 tr("Makes new incoming events bring the main window to the foreground.")); 
     47                tr("Makes new incoming events bring the main window to the foreground." 
     48                " It does not take the keyboard focus, so it will not interfere with your work.")); 
    4849        QWhatsThis::add(d->ck_ignoreNonRoster, 
    4950                tr("Makes Psi ignore all incoming events from contacts"