Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/qx11embed_x11.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the QtGui module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
    4040****************************************************************************/
    4141
     42
    4243#include "qx11embed_x11.h"
    4344#include <qapplication.h>
     
    123124
    124125    There are XEmbed widgets available for KDE and GTK+. The GTK+
    125     equivalent of QX11EmbedWidget is GtkPlug. The KDE widget is called
    126     QXEmbed.
     126    equivalent of QX11EmbedWidget is GtkPlug. The
     127    QXEmbed.
    127128
    128129    \sa QX11EmbedContainer, {XEmbed Specification}
     
    177178    lost.
    178179
    179     The GTK+ equivalent of QX11EmbedContainer is GtkSocket. The KDE
    180     widget is called QXEmbed.
     180    The GTK+ equivalent of QX11EmbedContainer is GtkSocket. The
     181    widget is called QXEmbed.
    181182
    182183    \sa QX11EmbedWidget, {XEmbed Specification}
     
    827828                                   &bytes_after_return, &prop_return) == Success) {
    828829                if (nitems_return > 1) {
    829                     if (((int * )prop_return)[1] & XEMBED_MAPPED) {
     830                    if ((( * )prop_return)[1] & XEMBED_MAPPED) {
    830831                        XMapWindow(x11Info().display(), internalWinId());
    831832                    } else {
     
    12981299        // keypresses.
    12991300        if (o == window() && d->client) {
    1300             if (!d->isEmbedded() && d->activeContainer == this)
    1301                 d->moveInputToProxy();
    1302 
    13031301            if (d->clientIsXEmbed) {
    13041302                sendXEmbedMessage(d->client, x11Info().display(), XEMBED_WINDOW_ACTIVATE);
     
    13081306                    XSetInputFocus(x11Info().display(), d->client, XRevertToParent, x11Time());
    13091307            }
     1308
     1309
    13101310        }
    13111311        break;
     
    16721672            clientIsXEmbed = true;
    16731673
    1674             unsigned int *p = (unsigned int *)prop_return;
     1674            *)prop_return;
    16751675            if (nitems_return >= 2)
    1676                 clientversion = p[0];
     1676                clientversion = p[0];
    16771677        }
    16781678
     
    17301730        if (q->hasFocus()) {
    17311731            XSetInputFocus(q->x11Info().display(), client, XRevertToParent, x11Time());
    1732         } else {
    1733             if (!isEmbedded())
    1734                 moveInputToProxy();
    17351732        }
     1733
     1734
     1735
    17361736    }
    17371737
     
    17501750{
    17511751    Q_Q(QX11EmbedContainer);
    1752     WId focus;
    1753     int revert_to;
    1754     XGetInputFocus(q->x11Info().display(), &focus, &revert_to);
    1755     if (focus != focusProxy->internalWinId())
    1756         XSetInputFocus(q->x11Info().display(), focusProxy->internalWinId(), XRevertToParent, x11Time());
     1752    // Following Owen Taylor's advice from the XEmbed specification to
     1753    // always use CurrentTime when no explicit user action is involved.
     1754    XSetInputFocus(q->x11Info().display(), focusProxy->internalWinId(), XRevertToParent, CurrentTime);
    17571755}
    17581756
Note: See TracChangeset for help on using the changeset viewer.