Builder/RightGtkView.js
[app.Builder.js] / Builder / RightGtkView.js
index 2bd069d..5b23391 100755 (executable)
@@ -238,8 +238,14 @@ RightGtkView = new XObject({
                 print(e.toString());
                 return;
             }
-             x.get_global_object()._top.el.show_all();
+             
+            var _top = x.get_global_object()._top;
             
+            _top.el.set_screen(Gdk.Screen.get_default()); // just in case..
+            _top.el.show_all();
+            if (_top.el.popup) {
+                _top.el.popup(null, null, null, null, 3, null);
+            }
         },
         
         buildJS: function(data) {
@@ -266,9 +272,9 @@ RightGtkView = new XObject({
              * sandbox it? - nope then will have dificulting passing. stuff aruond..
              * 
              */
-             if (!data) {
+            if (!data) {
                  return; 
-                }
+            }
             var src = this.buildJS(data);
             var x = new imports.sandbox.Context();
             x.add_globals();
@@ -282,15 +288,22 @@ RightGtkView = new XObject({
             }
             
             var r = new Gdk.Rectangle();
-            x.get_global_object()._top.el.show_all();
+            var _top = x.get_global_object()._top;
+            
+            _top.el.set_screen(Gdk.Screen.get_default()); // just in case..
+            _top.el.show_all();
+            if (_top.el.popup) {
+                _top.el.popup(null, null, null, null, 3, null);
+            }
+            
             
             
-            var pb = x.get_global_object()._top.el.get_snapshot(r);
-            if (pb) {
+            var pb = _top.el.get_snapshot(r);
+            if (!pb) {
                 return;
             }
-            x.get_global_object()._top.el.hide();
-            x.get_global_object()._top.el.destroy();
+            _top.el.hide();
+            _top.el.destroy();
             x._top = false;
             var Window = imports.Builder.Window.Window;
             var gc = new Gdk.GC.c_new(Window.el.window);