Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void QWidget::activateWindow (  )  [inherited]

Sets the top-level widget containing this widget to be the active window.

An active window is a visible top-level window that has the keyboard input focus.

This function performs the same operation as clicking the mouse on the title bar of a top-level window. On X11, the result depends on the Window Manager. If you want to ensure that the window is stacked on top as well you should also call raise(). Note that the window must be visible, otherwise activateWindow() has no effect.

On Windows, if you are calling this when the application is not currently the active one then it will not make it the active window. It will change the color of the taskbar entry to indicate that the window has changed in some way. This is because Microsoft do not allow an application to interrupt what the user is currently doing in another application.

See also:
isActiveWindow(), window(), show()

Definition at line 1478 of file qwidget_x11.cpp.

References QWidget::internalWinId(), QWidget::isVisible(), and QWidget::window().

Referenced by QAccessibleApplication::doAction(), QAccessibleWidget::doAction(), QWidget::setWindowState(), QWidget::showFullScreen(), and View::showInformation().

    QWidget *tlw = window();
    if (tlw->isVisible() && !tlw->d_func()->topData()->embedded && !X11->deferred_map.contains(tlw)) {
        XSetInputFocus(X11->display, tlw->internalWinId(), XRevertToParent, X11->time);

Generated by  Doxygen 1.6.0   Back to index