projects
/
rodin
/
chimara.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Quick and hacky implementation of glk_draw_image_scaled().
[rodin/chimara.git]
/
libchimara
/
window.c
diff --git
a/libchimara/window.c
b/libchimara/window.c
index 209cda689a57e9cb5bd6515ecf723c11f798078d..02f1e5ceb0e58d47ee8dca4abbf96d4e1e5f4cde 100644
(file)
--- a/
libchimara/window.c
+++ b/
libchimara/window.c
@@
-561,16
+561,13
@@
glk_window_open(winid_t split, glui32 method, glui32 size, glui32 wintype,
case wintype_Graphics:
{
case wintype_Graphics:
{
- // TODO: Find real size
- GdkPixmap *newmap = gdk_pixmap_new(NULL, 800, 600, 24);
- GtkWidget *image = gtk_image_new_from_pixmap(newmap, NULL);
- g_object_unref(newmap);
-
+ GtkWidget *image = gtk_image_new_from_pixmap(NULL, NULL);
gtk_widget_show(image);
gtk_widget_show(image);
+ win->unit_width = 1;
+ win->unit_height = 1;
win->widget = image;
win->frame = image;
win->widget = image;
win->frame = image;
-
/* Connect signal handlers */
win->button_press_event_handler = g_signal_connect(image, "button-press-event", G_CALLBACK(on_window_button_press), win);
/* Connect signal handlers */
win->button_press_event_handler = g_signal_connect(image, "button-press-event", G_CALLBACK(on_window_button_press), win);