|
|
|
@ -199,7 +199,7 @@ static void sendXEmbedMessage( WId window, long message, long detail = 0,
|
|
|
|
|
ev.xclient.window = window;
|
|
|
|
|
ev.xclient.message_type = xembed;
|
|
|
|
|
ev.xclient.format = 32;
|
|
|
|
|
ev.xclient.data.l[0] = GET_QT_X_TIME();
|
|
|
|
|
ev.xclient.data.l[0] = get_tqt_x_time();
|
|
|
|
|
ev.xclient.data.l[1] = message;
|
|
|
|
|
ev.xclient.data.l[2] = detail;
|
|
|
|
|
ev.xclient.data.l[3] = data1;
|
|
|
|
@ -219,7 +219,7 @@ static void sendClientMessage(Window window, Atom a, long x)
|
|
|
|
|
ev.xclient.message_type = a;
|
|
|
|
|
ev.xclient.format = 32;
|
|
|
|
|
ev.xclient.data.l[0] = x;
|
|
|
|
|
ev.xclient.data.l[1] = GET_QT_X_TIME();
|
|
|
|
|
ev.xclient.data.l[1] = get_tqt_x_time();
|
|
|
|
|
XSendEvent(tqt_xdisplay(), window, false, NoEventMask, &ev);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -419,8 +419,8 @@ static int qxembed_x11_event_filter( XEvent* e)
|
|
|
|
|
long message = e->xclient.data.l[1];
|
|
|
|
|
long detail = e->xclient.data.l[2];
|
|
|
|
|
// L0671: Keep Qt message time up to date
|
|
|
|
|
if ( msgtime > GET_QT_X_TIME() )
|
|
|
|
|
SET_QT_X_TIME(msgtime);
|
|
|
|
|
if ( msgtime > get_tqt_x_time() )
|
|
|
|
|
set_tqt_x_time(msgtime);
|
|
|
|
|
TQWidget* w = TQT_TQWIDGET(TQWidget::find( e->xclient.window ));
|
|
|
|
|
if ( !w )
|
|
|
|
|
break;
|
|
|
|
@ -538,8 +538,8 @@ static int qxembed_x11_event_filter( XEvent* e)
|
|
|
|
|
Atom a = e->xclient.data.l[0];
|
|
|
|
|
if ( a == tqt_wm_take_focus ) {
|
|
|
|
|
// L0695: update Qt message time variable
|
|
|
|
|
if ( (ulong) e->xclient.data.l[1] > GET_QT_X_TIME() )
|
|
|
|
|
SET_QT_X_TIME(e->xclient.data.l[1]);
|
|
|
|
|
if ( (ulong) e->xclient.data.l[1] > get_tqt_x_time() )
|
|
|
|
|
set_tqt_x_time(e->xclient.data.l[1]);
|
|
|
|
|
// L0696: There is no problem when the window is not active.
|
|
|
|
|
// Qt will generate a WindowActivate event that will
|
|
|
|
|
// do the job (L1310). This does not happen if the
|
|
|
|
@ -663,7 +663,7 @@ QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f)
|
|
|
|
|
if ( tqApp->activeWindow() == topLevelWidget() )
|
|
|
|
|
if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded )
|
|
|
|
|
XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
|
|
|
|
|
RevertToParent, GET_QT_X_TIME() );
|
|
|
|
|
RevertToParent, get_tqt_x_time() );
|
|
|
|
|
// L0915: ??? [drag&drop?]
|
|
|
|
|
setAcceptDrops( true );
|
|
|
|
|
}
|
|
|
|
@ -715,7 +715,7 @@ QXEmbed::~QXEmbed()
|
|
|
|
|
int revert;
|
|
|
|
|
XGetInputFocus( tqt_xdisplay(), &focus, &revert );
|
|
|
|
|
if( focus == d->focusProxy->winId())
|
|
|
|
|
XSetInputFocus( tqt_xdisplay(), topLevelWidget()->winId(), RevertToParent, GET_QT_X_TIME() );
|
|
|
|
|
XSetInputFocus( tqt_xdisplay(), topLevelWidget()->winId(), RevertToParent, get_tqt_x_time() );
|
|
|
|
|
// L01045: Delete our private data.
|
|
|
|
|
delete d;
|
|
|
|
|
}
|
|
|
|
@ -785,7 +785,7 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e)
|
|
|
|
|
if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded )
|
|
|
|
|
if (! hasFocus() )
|
|
|
|
|
XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
|
|
|
|
|
RevertToParent, GET_QT_X_TIME() );
|
|
|
|
|
RevertToParent, get_tqt_x_time() );
|
|
|
|
|
if (d->xplain)
|
|
|
|
|
// L1311: Activation has changed. Grab state might change. See L2800.
|
|
|
|
|
checkGrab();
|
|
|
|
@ -869,7 +869,7 @@ void QXEmbed::focusInEvent( TQFocusEvent * e ){
|
|
|
|
|
// This is dual safety here because FocusIn implies this.
|
|
|
|
|
// But see L1581 for an example where this really matters.
|
|
|
|
|
XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
|
|
|
|
|
RevertToParent, GET_QT_X_TIME() );
|
|
|
|
|
RevertToParent, get_tqt_x_time() );
|
|
|
|
|
if (d->xplain) {
|
|
|
|
|
// L1520: Qt focus has changed. Grab state might change. See L2800.
|
|
|
|
|
checkGrab();
|
|
|
|
@ -919,7 +919,7 @@ void QXEmbed::focusOutEvent( TQFocusEvent * ){
|
|
|
|
|
// Function isActiveWindow() also returns true when a modal
|
|
|
|
|
// dialog child of this window is active.
|
|
|
|
|
XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
|
|
|
|
|
RevertToParent, GET_QT_X_TIME() );
|
|
|
|
|
RevertToParent, get_tqt_x_time() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|