[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
mrobinson at webkit.org
mrobinson at webkit.org
Wed Dec 22 14:44:08 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 74b873c0bb520e465b917a1072a2972960fe07b5
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 18 22:02:05 2010 +0000
2010-10-18 Martin Robinson <mrobinson at igalia.com>
Build fix for newer versions of GTK+ 2.0. Instead of using GDK_DISPLAY()
use GDK_DRAWABLE_XDISPLAY(gdk_display_get_default()). GDK_DISPLAY() was
recently deprecated and the latter method has been available since GTK+
2.2.
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::updatePluginWidget):
(WebCore::PluginView::paint):
(WebCore::PluginView::initXEvent):
(WebCore::PluginView::platformGetValue):
(WebCore::getVisualAndColormap):
(WebCore::PluginView::platformStart):
(WebCore::PluginView::platformDestroy):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e075b78..096561e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-18 Martin Robinson <mrobinson at igalia.com>
+
+ Build fix for newer versions of GTK+ 2.0. Instead of using GDK_DISPLAY()
+ use GDK_DRAWABLE_XDISPLAY(gdk_display_get_default()). GDK_DISPLAY() was
+ recently deprecated and the latter method has been available since GTK+
+ 2.2.
+
+ * plugins/gtk/PluginViewGtk.cpp:
+ (WebCore::PluginView::updatePluginWidget):
+ (WebCore::PluginView::paint):
+ (WebCore::PluginView::initXEvent):
+ (WebCore::PluginView::platformGetValue):
+ (WebCore::getVisualAndColormap):
+ (WebCore::PluginView::platformStart):
+ (WebCore::PluginView::platformDestroy):
+
2010-10-18 Ryosuke Niwa <rniwa at webkit.org>
Reviewed by Adam Barth.
diff --git a/WebCore/plugins/gtk/PluginViewGtk.cpp b/WebCore/plugins/gtk/PluginViewGtk.cpp
index 1b5fb02..6954af3 100644
--- a/WebCore/plugins/gtk/PluginViewGtk.cpp
+++ b/WebCore/plugins/gtk/PluginViewGtk.cpp
@@ -137,13 +137,14 @@ void PluginView::updatePluginWidget()
#if defined(XP_UNIX)
if (!m_isWindowed) {
+ Display* display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
if (m_drawable)
- XFreePixmap(GDK_DISPLAY(), m_drawable);
+ XFreePixmap(display, m_drawable);
- m_drawable = XCreatePixmap(GDK_DISPLAY(), getRootWindow(m_parentFrame.get()),
+ m_drawable = XCreatePixmap(display, getRootWindow(m_parentFrame.get()),
m_windowRect.width(), m_windowRect.height(),
((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth);
- XSync(GDK_DISPLAY(), false); // make sure that the server knows about the Drawable
+ XSync(display, false); // make sure that the server knows about the Drawable
}
#endif
@@ -187,13 +188,14 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
if (!m_drawable)
return;
- const bool syncX = m_pluginDisplay && m_pluginDisplay != GDK_DISPLAY();
+ Display* display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
+ const bool syncX = m_pluginDisplay && m_pluginDisplay != display;
IntRect exposedRect(rect);
exposedRect.intersect(frameRect());
exposedRect.move(-frameRect().x(), -frameRect().y());
- PlatformRefPtr<cairo_surface_t> drawableSurface = adoptPlatformRef(cairo_xlib_surface_create(GDK_DISPLAY(),
+ PlatformRefPtr<cairo_surface_t> drawableSurface = adoptPlatformRef(cairo_xlib_surface_create(display,
m_drawable,
m_visual,
m_windowRect.width(),
@@ -227,7 +229,7 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
memset(&xevent, 0, sizeof(XEvent));
XGraphicsExposeEvent& exposeEvent = xevent.xgraphicsexpose;
exposeEvent.type = GraphicsExpose;
- exposeEvent.display = GDK_DISPLAY();
+ exposeEvent.display = display;
exposeEvent.drawable = m_drawable;
exposeEvent.x = exposedRect.x();
exposeEvent.y = exposedRect.y();
@@ -317,7 +319,7 @@ void PluginView::initXEvent(XEvent* xEvent)
xEvent->xany.serial = 0; // we are unaware of the last request processed by X Server
xEvent->xany.send_event = false;
- xEvent->xany.display = GDK_DISPLAY();
+ xEvent->xany.display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
// NOTE: event->xany.window doesn't always correspond to the .window property of other XEvent's
// but does in the case of KeyPress, KeyRelease, ButtonPress, ButtonRelease, and MotionNotify
// events; thus, this is right:
@@ -608,7 +610,7 @@ bool PluginView::platformGetValue(NPNVariable variable, void* value, NPError* re
case NPNVxDisplay:
#if defined(XP_UNIX)
if (m_needsXEmbed)
- *(void **)value = (void *)GDK_DISPLAY();
+ *(void **)value = (void *)GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
else
*(void **)value = (void *)GTK_XTBIN(platformPluginWidget())->xtclient.xtdisplay;
*result = NPERR_NO_ERROR;
@@ -703,8 +705,9 @@ static void getVisualAndColormap(int depth, Visual** visual, Colormap* colormap)
*visual = 0;
*colormap = 0;
+ Display* display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
int rmaj, rmin;
- if (depth == 32 && (!XRenderQueryVersion(GDK_DISPLAY(), &rmaj, &rmin) || (rmaj == 0 && rmin < 5)))
+ if (depth == 32 && (!XRenderQueryVersion(display, &rmaj, &rmin) || (rmaj == 0 && rmin < 5)))
return;
XVisualInfo templ;
@@ -712,14 +715,14 @@ static void getVisualAndColormap(int depth, Visual** visual, Colormap* colormap)
templ.depth = depth;
templ.c_class = TrueColor;
int nVisuals;
- XVisualInfo* visualInfo = XGetVisualInfo(GDK_DISPLAY(), VisualScreenMask | VisualDepthMask | VisualClassMask, &templ, &nVisuals);
+ XVisualInfo* visualInfo = XGetVisualInfo(display, VisualScreenMask | VisualDepthMask | VisualClassMask, &templ, &nVisuals);
if (!nVisuals)
return;
if (depth == 32) {
for (int idx = 0; idx < nVisuals; ++idx) {
- XRenderPictFormat* format = XRenderFindVisualFormat(GDK_DISPLAY(), visualInfo[idx].visual);
+ XRenderPictFormat* format = XRenderFindVisualFormat(display, visualInfo[idx].visual);
if (format->type == PictTypeDirect && format->direct.alphaMask) {
*visual = visualInfo[idx].visual;
break;
@@ -731,7 +734,7 @@ static void getVisualAndColormap(int depth, Visual** visual, Colormap* colormap)
XFree(visualInfo);
if (*visual)
- *colormap = XCreateColormap(GDK_DISPLAY(), GDK_ROOT_WINDOW(), *visual, AllocNone);
+ *colormap = XCreateColormap(display, GDK_ROOT_WINDOW(), *visual, AllocNone);
}
#endif
@@ -845,7 +848,7 @@ bool PluginView::platformStart()
ws->depth = gdk_visual_get_depth(gvisual);
}
- ws->display = GDK_DISPLAY();
+ ws->display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
ws->visual = m_visual;
ws->colormap = m_colormap;
@@ -875,7 +878,7 @@ void PluginView::platformDestroy()
{
#if defined(XP_UNIX)
if (m_drawable) {
- XFreePixmap(GDK_DISPLAY(), m_drawable);
+ XFreePixmap(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), m_drawable);
m_drawable = 0;
}
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list