[grits] Update OpenGL widget positioning under OSX
- From: Andy Spencer <andys src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grits] Update OpenGL widget positioning under OSX
- Date: Mon, 21 Jan 2013 05:25:03 +0000 (UTC)
commit 1deeccd3a6203f50c3fa67c87b46d98a019b9e80
Author: Andy Spencer <andy753421 gmail com>
Date: Wed Jan 2 06:03:32 2013 +0000
Update OpenGL widget positioning under OSX
src/gtkgl.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/gtkgl.c b/src/gtkgl.c
index 8808ed5..32957f5 100644
--- a/src/gtkgl.c
+++ b/src/gtkgl.c
@@ -288,6 +288,8 @@ void gtk_gl_begin(GtkWidget *widget)
GtkAllocation alloc;
gdk_window_ensure_native(gtk_widget_get_window(widget));
gtk_widget_get_allocation(widget, &alloc);
+ gtk_widget_translate_coordinates(widget, gtk_widget_get_toplevel(widget),
+ 0, 0, &alloc.x, &alloc.y);
NSOpenGLContext *ctx = g_object_get_data(G_OBJECT(widget), "glcontext");
GdkWindow *win = gtk_widget_get_window(widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]