Commit 116e1fa7373987ff8840f51b66b34267171e97ed
- Diff rendering mode:
- inline
- side by side
debian/changelog
(6 / 0)
|   | |||
| 1 | duicompositor (0.3.6~1) karmic; urgency=low | ||
| 2 | |||
| 3 | * New version [UNRELEASED] | ||
| 4 | |||
| 5 | -- Abdiel Janulgue <abj@codefuassasin.research.nokia.com> Sat, 13 Mar 2010 17:20:01 +0200 | ||
| 6 | |||
| 1 | 7 | duicompositor (0.3.5-1) unstable; urgency=low | |
| 2 | 8 | ||
| 3 | 9 | * Fixes: NB#157682 Screen blanks with pin query, doesnot revert back to UI either |
src/duicompositemanager.cpp
(29 / 13)
|   | |||
| 111 | 111 | ||
| 112 | 112 | // DUI-specific | |
| 113 | 113 | _DUI_DECORATOR_WINDOW, | |
| 114 | _DUI_STATUSBAR_OVERLAY, | ||
| 114 | 115 | #ifdef WINDOW_DEBUG | |
| 115 | 116 | _DUI_WM_INFO, | |
| 116 | 117 | _DUI_WM_WINDOW_ZVALUE, | |
| … | … | ||
| 126 | 126 | static DuiCompAtoms* instance(); | |
| 127 | 127 | Type windowType(Window w); | |
| 128 | 128 | bool isDecorator(Window w); | |
| 129 | bool statusBarOverlayed(Window w); | ||
| 129 | 130 | int getPid(Window w); | |
| 130 | 131 | long getWmState(Window w); | |
| 131 | 132 | Atom getState(Window w); | |
| … | … | ||
| 204 | 204 | atoms[_NET_ACTIVE_WINDOW] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False); | |
| 205 | 205 | atoms[_NET_CLOSE_WINDOW] = XInternAtom(dpy, "_NET_CLOSE_WINDOW", False); | |
| 206 | 206 | atoms[_DUI_DECORATOR_WINDOW] = XInternAtom(dpy, "_DUI_DECORATOR_WINDOW", False); | |
| 207 | // remove this when statusbar in-scene approach is done | ||
| 208 | atoms[_DUI_STATUSBAR_OVERLAY] = XInternAtom(dpy, "_DUI_STATUSBAR_OVERLAY", False); | ||
| 207 | 209 | ||
| 208 | 210 | #ifdef WINDOW_DEBUG | |
| 209 | 211 | // custom properties for CITA | |
| … | … | ||
| 251 | 251 | { | |
| 252 | 252 | return (intValueProperty(w, atoms[_DUI_DECORATOR_WINDOW]) == 1); | |
| 253 | 253 | } | |
| 254 | |||
| 255 | // Remove this when statusbar in-scene approach is done | ||
| 256 | bool DuiCompAtoms::statusBarOverlayed(Window w) | ||
| 257 | { | ||
| 258 | return (intValueProperty(w, atoms[_DUI_STATUSBAR_OVERLAY]) == 1); | ||
| 259 | } | ||
| 254 | 260 | ||
| 255 | 261 | int DuiCompAtoms::getPid(Window w) | |
| 256 | 262 | { | |
| … | … | ||
| 487 | 487 | } | |
| 488 | 488 | } | |
| 489 | 489 | ||
| 490 | static bool need_geometry_modify(Window window) | ||
| 491 | { | ||
| 492 | DuiCompAtoms* atom = DuiCompAtoms::instance(); | ||
| 493 | |||
| 494 | if ((atom->getState(window) == ATOM(_NET_WM_STATE_FULLSCREEN)) || | ||
| 495 | (atom->statusBarOverlayed(window))) | ||
| 496 | return false; | ||
| 497 | |||
| 498 | return true; | ||
| 499 | } | ||
| 500 | |||
| 490 | 501 | DuiCompositeManagerPrivate::DuiCompositeManagerPrivate(QObject *p) | |
| 491 | 502 | : QObject(p), | |
| 492 | 503 | glwidget(0), | |
| … | … | ||
| 742 | 742 | return; | |
| 743 | 743 | ||
| 744 | 744 | // dock changed | |
| 745 | if (hasDock && (atom->windowType(e->window) == DuiCompAtoms::DOCK) | ||
| 746 | && (atom->getState(e->window) != ATOM(_NET_WM_STATE_FULLSCREEN))){ | ||
| 745 | if (hasDock && (atom->windowType(e->window) == DuiCompAtoms::DOCK)) { | ||
| 747 | 746 | dock_region = QRegion(e->x, e->y, e->width, e->height); | |
| 748 | 747 | QRect r = (QRegion(QApplication::desktop()->screenGeometry()) - dock_region).boundingRect(); | |
| 749 | if (stack[DESKTOP_LAYER]) | ||
| 748 | if (stack[DESKTOP_LAYER] && need_geometry_modify(stack[DESKTOP_LAYER])) | ||
| 750 | 749 | XMoveResizeWindow(QX11Info::display(), stack[DESKTOP_LAYER], r.x(), r.y(), r.width(), r.height()); | |
| 751 | 750 | ||
| 752 | if (stack[APPLICATION_LAYER]) | ||
| 751 | if (stack[APPLICATION_LAYER] && need_geometry_modify(stack[APPLICATION_LAYER])) | ||
| 753 | 752 | XMoveResizeWindow(QX11Info::display(), stack[APPLICATION_LAYER], r.x(), r.y(), r.width(), r.height()); | |
| 754 | 753 | ||
| 755 | if (stack[INPUT_LAYER]) | ||
| 754 | if (stack[INPUT_LAYER] && need_geometry_modify(stack[INPUT_LAYER])) | ||
| 756 | 755 | XMoveResizeWindow(QX11Info::display(), stack[INPUT_LAYER], r.x(), r.y(), r.width(), r.height()); | |
| 757 | 756 | } | |
| 758 | 757 | ||
| … | … | ||
| 811 | 811 | || atom->windowType(e->window) == DuiCompAtoms::DESKTOP | |
| 812 | 812 | || atom->windowType(e->window) == DuiCompAtoms::INPUT) | |
| 813 | 813 | && (atom->windowType(e->window) != DuiCompAtoms::DOCK)) { | |
| 814 | if (hasDock && ((dock_region.boundingRect().width() <= a.width) && | ||
| 815 | (dock_region.boundingRect().height() <= a.height))) { | ||
| 816 | QRect r = (QRegion(a.x, a.y, a.width, a.height) - dock_region).boundingRect(); | ||
| 814 | if (hasDock) { | ||
| 815 | QRect r = (QRegion(QApplication::desktop()->screenGeometry()) - dock_region).boundingRect(); | ||
| 817 | 816 | if(availScreenRect != r) | |
| 818 | 817 | availScreenRect = r; | |
| 819 | if(atom->getState(e->window) != ATOM(_NET_WM_STATE_FULLSCREEN)) | ||
| 818 | if(need_geometry_modify(e->window)) | ||
| 820 | 819 | XMoveResizeWindow(dpy, e->window, r.x(), r.y(), r.width(), r.height()); | |
| 821 | 820 | } else if ((a.width != xres) && (a.height != yres)) { | |
| 822 | 821 | XResizeWindow(dpy, e->window, xres, yres); | |
| … | … | ||
| 1611 | 1611 | // here exactly before compositing was enabled | |
| 1612 | 1612 | // Ensure the changes are visualized immediately | |
| 1613 | 1613 | ||
| 1614 | glwidget->setAttribute(Qt::WA_PaintOutsidePaintEvent); | ||
| 1615 | 1614 | QPainter m(glwidget); | |
| 1616 | 1615 | m.drawPixmap(0, 0, QPixmap::grabWindow(QX11Info::appRootWindow())); | |
| 1617 | 1616 | glwidget->update(); | |
| 1618 | 1617 | QCoreApplication::flush(); | |
| 1619 | XSync(QX11Info::display(), False); | ||
| 1620 | 1618 | ||
| 1621 | 1619 | // Freeze painting of framebuffer as of this point | |
| 1622 | 1620 | scene()->views()[0]->setUpdatesEnabled(false); | |
| 1623 | XMoveWindow(QX11Info::display(), localwin, -2, -2); | ||
| 1624 | 1621 | XMapWindow(QX11Info::display(), xoverlay); | |
| 1625 | XSync(QX11Info::display(), False); | ||
| 1626 | 1622 | } | |
| 1627 | 1623 | ||
| 1628 | 1624 | void DuiCompositeManagerPrivate::enableRedirection() | |
| … | … | ||
| 1771 | 1771 | ||
| 1772 | 1772 | void DuiCompositeManager::setGLWidget(QGLWidget *glw) | |
| 1773 | 1773 | { | |
| 1774 | glw->setAttribute(Qt::WA_PaintOutsidePaintEvent); | ||
| 1774 | 1775 | d->glwidget = glw; | |
| 1775 | 1776 | } | |
| 1776 | 1777 |
src/main.cpp
(0 / 1)
|   | |||
| 41 | 41 | view.setWindowFlags(Qt::X11BypassWindowManagerHint); | |
| 42 | 42 | view.setAttribute(Qt::WA_NoSystemBackground); | |
| 43 | 43 | #if QT_VERSION >= 0x040600 | |
| 44 | view.move(-2, -2); | ||
| 45 | 44 | view.setViewportUpdateMode(QGraphicsView::NoViewportUpdate); | |
| 46 | 45 | view.setOptimizationFlags(QGraphicsView::IndirectPainting); | |
| 47 | 46 | #endif |

