mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
5674: temp fix to prevent dialogs from grabbing selection ownership forever. r=mcafee/a=chofmann
This commit is contained in:
parent
30d71aa4e8
commit
f8d73c5821
@ -141,15 +141,26 @@ nsresult nsClipboard::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
||||
|
||||
void nsClipboard::SetTopLevelWidget(GtkWidget* w)
|
||||
{
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf(" nsClipboard::SetTopLevelWidget\n");
|
||||
#endif /* DEBUG_CLIPBOARD */
|
||||
|
||||
// Don't set up any more event handlers if we're being called twice
|
||||
// for the same toplevel widget
|
||||
if (sWidget == w)
|
||||
return;
|
||||
|
||||
if (sWidget != 0 && sWidget->window != 0)
|
||||
return;
|
||||
|
||||
if (w == 0 || w->window == 0)
|
||||
{
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf(" nsClipboard::SetTopLevelWidget: widget passed in is null or has no window!\n");
|
||||
#endif /* DEBUG_CLIPBOARD */
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_CLIPBOARD
|
||||
printf(" nsClipboard::SetTopLevelWidget\n");
|
||||
#endif /* DEBUG_CLIPBOARD */
|
||||
|
||||
// If we're changing from one widget to another
|
||||
// (shouldn't generally happen), clear the old event handlers:
|
||||
if (sWidget &&
|
||||
|
Loading…
Reference in New Issue
Block a user