From 94bdfd96efc7253822c2d5f1d2cbf5ec686c4961 Mon Sep 17 00:00:00 2001 From: "blizzard%redhat.com" Date: Fri, 10 Dec 1999 20:23:21 +0000 Subject: [PATCH] Implement nsIWidget::Flash() for unix. This is part of bug #18518. r=pavlov,a=chofmann git-svn-id: svn://10.0.0.236/trunk@55859 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/gtk/nsWindow.cpp | 14 ++++++++++++++ mozilla/widget/src/gtk/nsWindow.h | 1 + 2 files changed, 15 insertions(+) diff --git a/mozilla/widget/src/gtk/nsWindow.cpp b/mozilla/widget/src/gtk/nsWindow.cpp index 384797413e8..5956a919918 100644 --- a/mozilla/widget/src/gtk/nsWindow.cpp +++ b/mozilla/widget/src/gtk/nsWindow.cpp @@ -1738,6 +1738,20 @@ NS_IMETHODIMP nsWindow::Resize(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, return NS_OK; } +NS_IMETHODIMP nsWindow::Flash(void) +{ + // get the next up moz area + GtkWidget *top_mozarea = GetMozArea(); + if (top_mozarea) { + GtkWidget *top_window = gtk_widget_get_toplevel(top_mozarea); + if (top_window) { + // this will raise the toplevel window + gdk_window_show(top_window->window); + } + } + return NS_OK; +} + /* virtual */ void nsWindow::OnRealize(GtkWidget *aWidget) { diff --git a/mozilla/widget/src/gtk/nsWindow.h b/mozilla/widget/src/gtk/nsWindow.h index 86263604d1f..d54d147df0a 100644 --- a/mozilla/widget/src/gtk/nsWindow.h +++ b/mozilla/widget/src/gtk/nsWindow.h @@ -81,6 +81,7 @@ public: NS_IMETHOD SetBackgroundColor(const nscolor &aColor); NS_IMETHOD SetCursor(nsCursor aCursor); NS_IMETHOD SetFocus(void); + NS_IMETHOD Flash(void); void QueueDraw(); void UnqueueDraw();