mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
b=93617 r=dcone sr=attinasi a=asa
Fixing print dialog focus problem on Unix
This commit is contained in:
parent
cb47c40527
commit
3d5977494d
@ -37,6 +37,7 @@
|
||||
#include "nsIDialogParamBlock.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsIDOMWindowInternal.h"
|
||||
|
||||
static NS_DEFINE_CID(kPrintOptionsCID, NS_PRINTOPTIONS_CID);
|
||||
|
||||
@ -181,8 +182,16 @@ NS_IMETHODIMP nsDeviceContextSpecGTK::Init(PRBool aQuiet)
|
||||
|
||||
nsCOMPtr<nsIWindowWatcher> wwatch(do_GetService("@mozilla.org/embedcomp/window-watcher;1"));
|
||||
if (wwatch) {
|
||||
|
||||
nsCOMPtr<nsIDOMWindowInternal> parent;
|
||||
nsCOMPtr<nsIDOMWindow> active;
|
||||
wwatch->GetActiveWindow(getter_AddRefs(active));
|
||||
if (active) {
|
||||
active->QueryInterface(NS_GET_IID(nsIDOMWindowInternal), getter_AddRefs(parent));
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> newWindow;
|
||||
rv = wwatch->OpenWindow(0, "chrome://global/content/printdialog.xul",
|
||||
rv = wwatch->OpenWindow(parent, "chrome://global/content/printdialog.xul",
|
||||
"_blank", "chrome,modal", paramBlockWrapper,
|
||||
getter_AddRefs(newWindow));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user