Changeset 775 for trunk/src/gui/painting/qwindowsurface_pm.cpp
- Timestamp:
- Aug 4, 2010, 1:28:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/painting/qwindowsurface_pm.cpp
r758 r775 368 368 if (widget == that->window()) 369 369 return &data; 370 if (!subWidgets || !subWidgets->contains(widget-> winId()))370 if (!subWidgets || !subWidgets->contains(widget->internalWinId())) 371 371 return 0; 372 return &(*subWidgets)[widget-> winId()];372 return &(*subWidgets)[widget->internalWinId()]; 373 373 } 374 374 … … 379 379 void QPMDiveWindowSurfacePrivate::addWidget(QWidget *widget) 380 380 { 381 Q_ASSERT(widget->internalWinId()); 382 381 383 WidgetData *wd = &data; 382 384 if (widget != that->window()) { … … 384 386 if (!subWidgets) 385 387 subWidgets = new QMap<HWND, WidgetData>(); 386 wd = &(*subWidgets)[widget-> winId()];388 wd = &(*subWidgets)[widget->internalWinId()]; 387 389 } 388 390 … … 398 400 // to handle other PM messages 399 401 widget->addPmEventFilter(this); 400 WinSetVisibleRegionNotify(widget-> winId(), TRUE);402 WinSetVisibleRegionNotify(widget->internalWinId(), TRUE); 401 403 } else { 402 404 // receive various PM messages 403 405 widget->addPmEventFilter(this); 404 // receive reparent/destruction messages from children 405 // to cleanup the map 406 // receive reparent messages from children to cleanup the map 406 407 widget->installEventFilter(this); 407 408 } … … 411 412 { 412 413 if (widget == that->window()) { 413 WinSetVisibleRegionNotify(widget-> winId(), FALSE);414 WinSetVisibleRegionNotify(widget->internalWinId(), FALSE); 414 415 widget->removePmEventFilter(this); 415 416 } else { 416 417 widget->removeEventFilter(this); 417 418 widget->removePmEventFilter(this); 418 } 419 420 if (widget != that->window()) 421 subWidgets->remove(widget->winId()); 419 subWidgets->remove(widget->internalWinId()); 420 } 422 421 } 423 422 … … 425 424 { 426 425 QWidget *widget = qobject_cast<QWidget *>(obj); 427 if (event->type() == QEvent::ParentAboutToChange || 428 event->type() == QEvent::Destroy) { 426 if (event->type() == QEvent::ParentAboutToChange) { 429 427 removeWidget(widget); 430 428 } … … 482 480 } 483 481 case WM_SIZE: { 484 if (msg->hwnd != that->window()-> winId()) {482 if (msg->hwnd != that->window()->internalWinId()) { 485 483 // sometimes PM doesn't send WM_VRNENABLED to the main widget 486 484 // when the sub-widget (its descendant) gets resized within it; … … 611 609 // produce a clip region that excludes all descending obstacles 612 610 // (like child widgets with real HWNDs which are not excluded by Qt) 613 HWND wwnd = widget-> winId();611 HWND wwnd = widget->internalWinId(); 614 612 RECTL wrcl = { wbr.left(), wh - wbr.bottom() - 1, 615 613 wbr.right() + 1, wh - wbr.top() }; … … 659 657 bool QPMDiveWindowSurface::adjustSetup(QWidget *widget) 660 658 { 661 HWND hwnd = window()-> winId();659 HWND hwnd = window()->internalWinId(); 662 660 663 661 // don't include lScreenPosX and the rest by default … … 693 691 ULONG rc = WinQueryVisibleRegion(hwnd, hrgn); 694 692 if (rc != RGN_ERROR) { 695 HWND hwndWidget = widget-> winId();693 HWND hwndWidget = widget->internalWinId(); 696 694 POINTL ptlOffset = { 0, 0 }; 697 695 if (hwnd != hwndWidget) {
Note:
See TracChangeset
for help on using the changeset viewer.