mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1228125 (part 2) - Remove nsIWidget::GetScreenBoundsUntyped(). r=botond.
This commit is contained in:
parent
bae167ebf7
commit
f64ae33631
@ -283,11 +283,11 @@ PopupBoxObject::GetOuterScreenRect()
|
||||
if (view) {
|
||||
nsIWidget* widget = view->GetWidget();
|
||||
if (widget) {
|
||||
nsIntRect screenRect;
|
||||
widget->GetScreenBoundsUntyped(screenRect);
|
||||
LayoutDeviceIntRect screenRect;
|
||||
widget->GetScreenBounds(screenRect);
|
||||
|
||||
int32_t pp = menuPopupFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
rect->SetLayoutRect(ToAppUnits(screenRect, pp));
|
||||
rect->SetLayoutRect(LayoutDeviceIntRect::ToAppUnits(screenRect, pp));
|
||||
}
|
||||
}
|
||||
return rect.forget();
|
||||
|
@ -2377,8 +2377,8 @@ nsWindow::OnConfigureEvent(GtkWidget *aWidget, GdkEventConfigure *aEvent)
|
||||
LOG(("configure event [%p] %d %d %d %d\n", (void *)this,
|
||||
aEvent->x, aEvent->y, aEvent->width, aEvent->height));
|
||||
|
||||
nsIntRect screenBounds;
|
||||
GetScreenBoundsUntyped(screenBounds);
|
||||
LayoutDeviceIntRect screenBounds;
|
||||
GetScreenBounds(screenBounds);
|
||||
|
||||
if (mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog) {
|
||||
// This check avoids unwanted rollup on spurious configure events from
|
||||
@ -2410,7 +2410,7 @@ nsWindow::OnConfigureEvent(GtkWidget *aWidget, GdkEventConfigure *aEvent)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mBounds.MoveTo(screenBounds.TopLeft());
|
||||
mBounds.MoveTo(screenBounds.TopLeft().ToUnknownPoint());
|
||||
|
||||
// XXX mozilla will invalidate the entire window after this move
|
||||
// complete. wtf?
|
||||
|
@ -825,19 +825,10 @@ class nsIWidget : public nsISupports {
|
||||
* Get this widget's outside dimensions in global coordinates. This
|
||||
* includes any title bar on the window.
|
||||
*
|
||||
* The untyped version exists temporarily to ease conversion to typed
|
||||
* coordinates.
|
||||
*
|
||||
* @param aRect On return it holds the x, y, width and height of
|
||||
* this widget.
|
||||
*/
|
||||
NS_IMETHOD GetScreenBounds(LayoutDeviceIntRect& aRect) = 0;
|
||||
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect& aRect) {
|
||||
LayoutDeviceIntRect tmp;
|
||||
nsresult rv = GetScreenBounds(tmp);
|
||||
aRect = tmp.ToUnknownRect();
|
||||
return rv;
|
||||
}
|
||||
|
||||
/**
|
||||
* Similar to GetScreenBounds except that this function will always
|
||||
|
Loading…
Reference in New Issue
Block a user