Put the default root window hack back in.
authorTilman Sauerbeck <tilman@code-monkey.de>
Mon, 23 Aug 2004 10:53:25 +0000 (10:53 +0000)
committerTilman Sauerbeck <tilman@code-monkey.de>
Mon, 23 Aug 2004 10:53:25 +0000 (10:53 +0000)
In the event structures the real window id will be used anyway.

src/ecore_x/rb_ecore_x.c

index cce61d2c463328444b8d0824ac61cc9242180e29..e6a89b4bf51cd42c1ac15e2eb210757c4b7d822c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_ecore_x.c 91 2004-08-22 23:06:05Z tilman $
+ * $Id: rb_ecore_x.c 94 2004-08-23 10:53:25Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -22,6 +22,7 @@
 
 #include <Ecore.h>
 #include <Ecore_X.h>
+#include <X11/Xlib.h>
 
 #include "../ecore/rb_ecore.h"
 #include "../ecore/rb_event_handler.h"
@@ -305,6 +306,7 @@ static VALUE c_ev_win_show_request_init (VALUE self, VALUE event)
 void Init_ecore_x (void)
 {
        VALUE c;
+       Ecore_X_Window w;
 
        rb_require ("ecore");
 
@@ -322,7 +324,8 @@ void Init_ecore_x (void)
        Init_Window ();
 
        /* now create the default root window object */
-       default_root = TO_ECORE_X_WINDOW (Qnil, 0);
+       w = DefaultRootWindow (ecore_x_display_get ());
+       default_root = TO_ECORE_X_WINDOW (Qnil, w);
        OBJ_FREEZE (default_root);
        rb_global_variable (&default_root);