diff options
author | mread <qt-info@nokia.com> | 2009-08-07 13:34:12 (GMT) |
---|---|---|
committer | mread <qt-info@nokia.com> | 2009-08-07 13:34:12 (GMT) |
commit | 5a72890b7ce12815f9567316da867006cff73f39 (patch) | |
tree | 46c8c793f19274f9ed19678d1732d2123adbdf34 /src/gui/kernel/qapplication_x11.cpp | |
parent | 0f6f1f841cea61cbb6905de92c2ca63bd369d55d (diff) | |
parent | cc0a411e5e874aa224c26298a109973cb15ea291 (diff) | |
download | Qt-5a72890b7ce12815f9567316da867006cff73f39.zip Qt-5a72890b7ce12815f9567316da867006cff73f39.tar.gz Qt-5a72890b7ce12815f9567316da867006cff73f39.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Conflicts fixed:
src/corelib/io/qdiriterator.cpp
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 64 |
1 files changed, 33 insertions, 31 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 5ef6b2e..4016563 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -117,7 +117,9 @@ extern "C" { #define XK_MISCELLANY #include <X11/keysymdef.h> +#if !defined(QT_NO_XINPUT) #include <X11/extensions/XI.h> +#endif #include <stdlib.h> #include <string.h> @@ -655,11 +657,13 @@ static int qt_x_errhandler(Display *dpy, XErrorEvent *err) break; default: +#if !defined(QT_NO_XINPUT) if (err->request_code == X11->xinput_major && err->error_code == (X11->xinput_errorbase + XI_BadDevice) && err->minor_code == 3 /* X_OpenDevice */) { return 0; } +#endif break; } @@ -1392,6 +1396,18 @@ static void qt_set_x11_resources(const char* font = 0, const char* fg = 0, color = kdeColor(QLatin1String("Colors:Button/ForegroundNormal"), theKdeSettings); if (color.isValid()) pal.setColor(QPalette::ButtonText, color); + + color = kdeColor(QLatin1String("linkColor"), theKdeSettings); + if (!color.isValid()) + color = kdeColor(QLatin1String("Colors:View/ForegroundLink"), theKdeSettings); + if (color.isValid()) + pal.setColor(QPalette::Link, color); + + color = kdeColor(QLatin1String("visitedLinkColor"), theKdeSettings); + if (!color.isValid()) + color = kdeColor(QLatin1String("Colors:View/ForegroundVisited"), theKdeSettings); + if (color.isValid()) + pal.setColor(QPalette::LinkVisited, color); } if (highlight.isValid() && highlightText.isValid()) { @@ -3230,48 +3246,43 @@ int QApplication::x11ProcessEvent(XEvent* event) #ifdef ALIEN_DEBUG //qDebug() << "QApplication::x11ProcessEvent:" << event->type; #endif - Time time = 0, userTime = 0; switch (event->type) { case ButtonPress: pressed_window = event->xbutton.window; - userTime = event->xbutton.time; + X11->userTime = event->xbutton.time; // fallthrough intended case ButtonRelease: - time = event->xbutton.time; + X11->time = event->xbutton.time; break; case MotionNotify: - time = event->xmotion.time; + X11->time = event->xmotion.time; break; case XKeyPress: - userTime = event->xkey.time; + X11->userTime = event->xkey.time; // fallthrough intended case XKeyRelease: - time = event->xkey.time; + X11->time = event->xkey.time; break; case PropertyNotify: - time = event->xproperty.time; + X11->time = event->xproperty.time; break; case EnterNotify: case LeaveNotify: - time = event->xcrossing.time; + X11->time = event->xcrossing.time; break; case SelectionClear: - time = event->xselectionclear.time; + X11->time = event->xselectionclear.time; break; default: -#ifndef QT_NO_XFIXES - if (X11->use_xfixes && event->type == (X11->xfixes_eventbase + XFixesSelectionNotify)) { - XFixesSelectionNotifyEvent *req = - reinterpret_cast<XFixesSelectionNotifyEvent *>(event); - time = req->selection_timestamp; - } -#endif break; } - if (time > X11->time) - X11->time = time; - if (userTime > X11->userTime) - X11->userTime = userTime; +#ifndef QT_NO_XFIXES + if (X11->use_xfixes && event->type == (X11->xfixes_eventbase + XFixesSelectionNotify)) { + XFixesSelectionNotifyEvent *req = + reinterpret_cast<XFixesSelectionNotifyEvent *>(event); + X11->time = req->selection_timestamp; + } +#endif QETWidget *widget = (QETWidget*)QWidget::find((WId)event->xany.window); @@ -3437,19 +3448,10 @@ int QApplication::x11ProcessEvent(XEvent* event) QSize oldSize(w->size()); w->data->crect.setWidth(DisplayWidth(X11->display, scr)); w->data->crect.setHeight(DisplayHeight(X11->display, scr)); - QVarLengthArray<QRect> oldSizes(desktop->numScreens()); - for (int i = 0; i < desktop->numScreens(); ++i) - oldSizes[i] = desktop->screenGeometry(i); QResizeEvent e(w->size(), oldSize); QApplication::sendEvent(w, &e); - for (int i = 0; i < qMin(oldSizes.count(), desktop->numScreens()); ++i) { - if (oldSizes[i] != desktop->screenGeometry(i)) - emit desktop->resized(i); - } - for (int i = oldSizes.count(); i < desktop->numScreens(); ++i) - emit desktop->resized(i); // added - for (int i = desktop->numScreens(); i < oldSizes.count(); ++i) - emit desktop->resized(i); // removed + if (w != desktop) + QApplication::sendEvent(desktop, &e); } #endif // QT_NO_XRANDR |