diff --git a/gfx/src/thebes/nsThebesImage.cpp b/gfx/src/thebes/nsThebesImage.cpp --- a/gfx/src/thebes/nsThebesImage.cpp +++ b/gfx/src/thebes/nsThebesImage.cpp @@ -45,6 +45,8 @@ #include "gfxPlatform.h" #include "prenv.h" + +#include "cairo.h" static PRBool gDisableOptimize = PR_FALSE; @@ -593,6 +595,7 @@ // END working around cairo/pixman bug (bug 364968) nsRefPtr pattern = new gfxPattern(surface); + cairo_pattern_set_filter(pattern->CairoPattern(), CAIRO_FILTER_NEAREST); pattern->SetMatrix(userSpaceToImageSpace); // OK now, the hard part left is to account for the subimage sampling diff --git a/layout/generic/nsHTMLCanvasFrame.cpp b/layout/generic/nsHTMLCanvasFrame.cpp --- a/layout/generic/nsHTMLCanvasFrame.cpp +++ b/layout/generic/nsHTMLCanvasFrame.cpp @@ -356,3 +356,27 @@ } #endif + + +NS_IMETHODIMP +nsHTMLCanvasFrame::HandlePress(nsPresContext* aPresContext, + nsGUIEvent* aEvent, + nsEventStatus* aEventStatus) +{ + fprintf(stderr, "capturing mouse\n"); + aEvent->widget->CaptureMouse(PR_TRUE); + CaptureMouse(aPresContext, PR_TRUE); + return nsFrame::HandlePress(aPresContext, aEvent, aEventStatus); +} + +NS_IMETHODIMP +nsHTMLCanvasFrame::HandleRelease(nsPresContext* aPresContext, + nsGUIEvent* aEvent, + nsEventStatus* aEventStatus) +{ + fprintf(stderr, "uncapturing mouse\n"); + aEvent->widget->CaptureMouse(PR_FALSE); + CaptureMouse(aPresContext, PR_FALSE); + return nsFrame::HandleRelease(aPresContext, aEvent, aEventStatus); +} + diff --git a/layout/generic/nsHTMLCanvasFrame.h b/layout/generic/nsHTMLCanvasFrame.h --- a/layout/generic/nsHTMLCanvasFrame.h +++ b/layout/generic/nsHTMLCanvasFrame.h @@ -99,6 +99,14 @@ NS_IMETHOD List(FILE* out, PRInt32 aIndent) const; #endif + NS_IMETHOD HandlePress(nsPresContext* aPresContext, + nsGUIEvent * aEvent, + nsEventStatus* aEventStatus); + + NS_IMETHOD HandleRelease(nsPresContext* aPresContext, + nsGUIEvent * aEvent, + nsEventStatus* aEventStatus); + protected: virtual ~nsHTMLCanvasFrame(); diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp --- a/widget/src/gtk2/nsWindow.cpp +++ b/widget/src/gtk2/nsWindow.cpp @@ -693,6 +693,7 @@ gShmSurfaceData = nsnull; XShmDetach(gdk_x11_get_default_xdisplay(), &gShmInfo); XDestroyImage(gXImage); + fprintf(stderr, "destroying shm stuff\n"); shmdt(gShmInfo.shmaddr); shmctl(gShmInfo.shmid, IPC_RMID, 0); gXImage = nsnull;