зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1319764 - Ensure Gtk window unmap workaround is actually used. r=karlt
We were miscounting the number of manual configure events which we needed to send gtk as the workaround for bug 1225044, causing it not to work in some cases. This is because configure events can come from more sources than were counting. Decrement mPendingConfigures only as far as zero, like configure_request_count in gtk_window_configure_event(). MozReview-Commit-ID: GxpR2Zozxor --HG-- extra : rebase_source : 9d02c4d019d8bea7a07c20fb1435d2f677ae6e28
This commit is contained in:
Родитель
c30b03e2f0
Коммит
7a3e0c46f7
|
@ -2401,7 +2401,9 @@ 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));
|
||||
|
||||
mPendingConfigures--;
|
||||
if (mPendingConfigures > 0) {
|
||||
mPendingConfigures--;
|
||||
}
|
||||
|
||||
LayoutDeviceIntRect screenBounds = GetScreenBounds();
|
||||
|
||||
|
@ -4212,7 +4214,7 @@ nsWindow::NativeShow(bool aAction)
|
|||
event.height = allocation.height;
|
||||
|
||||
auto shellClass = GTK_WIDGET_GET_CLASS(mShell);
|
||||
for (int i = 0; i < mPendingConfigures; i++) {
|
||||
for (unsigned int i = 0; i < mPendingConfigures; i++) {
|
||||
Unused << shellClass->configure_event(mShell, &event);
|
||||
}
|
||||
mPendingConfigures = 0;
|
||||
|
|
|
@ -469,7 +469,7 @@ private:
|
|||
|
||||
// Upper bound on pending ConfigureNotify events to be dispatched to the
|
||||
// window. See bug 1225044.
|
||||
int mPendingConfigures;
|
||||
unsigned int mPendingConfigures;
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
RefPtr<mozilla::a11y::Accessible> mRootAccessible;
|
||||
|
|
Загрузка…
Ссылка в новой задаче