qt5 waylnd support

2012-12-16 Thread Fred Ollinger
I have compiled wayland from git as well as qt5 under LFS 7.2 using
the instructions from LFS to get the dependencies installed (into
/opt/wayland) as well as the wayland and qt5 from git instructions
respectively.

I have a working weston system and I can run the demos for qt5, but
the menus do not work. The cursor (pointer) never changes from a stop
watch.

The applications are a mix of usable and not.

Here's some debug spew:

Qml debugging is enabled. Only use this in a safe environment!
Using Wayland-EGL
This plugin does not support propagateSizeHints()
This plugin does not support raise()
This plugin does not support raise()
This plugin does not support grabbing the keyboard
This plugin does not support raise()

Any ideas on how to get the last mile done, the menus working and so on.

Any info you need to help with this?

I'm willing to make changes on my system for better testing.

Sincerely,
Fred Ollinger
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


libwayland and Java

2012-12-16 Thread Jason Ekstrand
Hello All,
My name is Jason Ekstrand and I'm currently working on writing a Wayland
server for Android. This is not to be confused with what Pekka Paalanen is
working on; rather, my objective is to make a Wayland server that runs as
an actual Android app. I have a basic proof-of-concept working without any
input capabilities.

In order to tie into the Android services and events systems, a lot of
things have to be implemented in Java. It will be simpler if I can write
the entire server in Java. To that end, I'm writing Java bindings to
libwayland and have come across a few snags. Specifically, I really wish I
could do my own marshaling. Right now, I'm having to generate native
methods for every even just so that I can call the variadic
wl_resource_post_event. It would be much easier if there were a version
that could take an array of arguments so I could do everything at runtime.
I also have a function that translates c arguments to java for requests.
Again, I have to generate a native function for every request so that I can
pass in valid function pointers. It would be great if libwayland could call
my marshaling function directly and let me handle calling the request
callback. Would it be practical to build this kind of support into
libwayland?

Also, I would appreciate any feedback on wayland app project in general.

Thanks,
--Jason Ekstrand
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


ecore-wayland: (version2) Fix monitoring ECORE_FD_WRITE defaultly on wayland display fd lead to 100% cpu usage

2012-12-16 Thread Alex Wu
Hi all,
To fix the regression reported at
http://trac.enlightenment.org/e/ticket/1993, I cooked the version 2 of
this patch. Please checkout it out.
From e4ff96104075c972b24752e6799ac88acceccd48 Mon Sep 17 00:00:00 2001
From: Alex Wu zhiwen...@linux.intel.com
Date: Mon, 17 Dec 2012 11:05:11 +0800
Subject: [PATCH] ecore-wayland: (version 2)Fix monitoring ECORE_FD_WRITE
 defaultly on waylanddisplay fd lead to 100%
 cpu usage

In ecore_wl_init(), adding wayland display fd with ECORE_FD_WRITE
flag make CPU usage 100%. The proper way to monitor the ECORE_FD_WRITE
is when the wl_display_flush() return value  0 and errno == EAGAIN.
And if wl_display_flush() return, we remove ECORE_FD_WRITE flag from
the display fd.

Change from v1:
Add idle enterer destroy code into _ecore_wl_shutdown() to avoid
using freed wl_display.
---
 trunk/efl/src/lib/ecore_wayland/Ecore_Wayland.h |1 +
 trunk/efl/src/lib/ecore_wayland/ecore_wl.c  |   40 +--
 2 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/trunk/efl/src/lib/ecore_wayland/Ecore_Wayland.h 
b/trunk/efl/src/lib/ecore_wayland/Ecore_Wayland.h
index 5281c6f..eadfc14 100644
--- a/trunk/efl/src/lib/ecore_wayland/Ecore_Wayland.h
+++ b/trunk/efl/src/lib/ecore_wayland/Ecore_Wayland.h
@@ -87,6 +87,7 @@ struct _Ecore_Wl_Display
unsigned int mask;
unsigned int serial;
Ecore_Fd_Handler *fd_hdl;
+   Ecore_Idle_Enterer *idle_enterer;
 
struct wl_list inputs;
struct wl_list outputs;
diff --git a/trunk/efl/src/lib/ecore_wayland/ecore_wl.c 
b/trunk/efl/src/lib/ecore_wayland/ecore_wl.c
index 7f06a1d..3e5bc8f 100644
--- a/trunk/efl/src/lib/ecore_wayland/ecore_wl.c
+++ b/trunk/efl/src/lib/ecore_wayland/ecore_wl.c
@@ -7,6 +7,7 @@
 
 /* local function prototypes */
 static Eina_Bool _ecore_wl_shutdown(Eina_Bool close);
+static Eina_Bool _ecore_wl_cb_idle_enterer(void *data);
 static Eina_Bool _ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl);
 static void _ecore_wl_cb_handle_global(void *data, struct wl_registry 
*registry, unsigned int id, const char *interface, unsigned int version 
EINA_UNUSED);
 static Eina_Bool _ecore_wl_xkb_init(Ecore_Wl_Display *ewd);
@@ -138,10 +139,13 @@ ecore_wl_init(const char *name)
 
_ecore_wl_disp-fd_hdl =
  ecore_main_fd_handler_add(_ecore_wl_disp-fd,
-   ECORE_FD_READ | ECORE_FD_WRITE,
+   ECORE_FD_READ,
_ecore_wl_cb_handle_data, _ecore_wl_disp,
NULL, NULL);
 
+   _ecore_wl_disp-idle_enterer =
+ ecore_idle_enterer_add(_ecore_wl_cb_idle_enterer, _ecore_wl_disp);
+
wl_list_init(_ecore_wl_disp-inputs);
wl_list_init(_ecore_wl_disp-outputs);
 
@@ -356,6 +360,8 @@ _ecore_wl_shutdown(Eina_Bool close)
 
if (_ecore_wl_disp-fd_hdl)
  ecore_main_fd_handler_del(_ecore_wl_disp-fd_hdl);
+   if (_ecore_wl_disp-idle_enterer)
+  ecore_idle_enterer_del(_ecore_wl_disp-idle_enterer);
 
if (close)
  {
@@ -397,9 +403,31 @@ _ecore_wl_shutdown(Eina_Bool close)
 }
 
 static Eina_Bool
+_ecore_wl_cb_idle_enterer(void *data)
+{
+   Ecore_Wl_Display *ewd;
+   int ret;
+
+   if (!(ewd = data)) return ECORE_CALLBACK_RENEW;
+
+   ret = wl_display_flush(ewd-wl.display);
+   if (ret  0  errno == EAGAIN)
+ {
+ecore_main_fd_handler_active_set(ewd-fd_hdl, ECORE_FD_READ | 
ECORE_FD_WRITE);
+ }
+   else if (ret  0)
+ {
+  /* FIXME: need do error processing? */
+ }
+
+   return ECORE_CALLBACK_RENEW;
+}
+
+static Eina_Bool
 _ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl)
 {
Ecore_Wl_Display *ewd;
+   int ret;
 
/* LOGFN(__FILE__, __LINE__, __FUNCTION__); */
 
@@ -412,7 +440,15 @@ _ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl)
if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_READ))
  wl_display_dispatch(ewd-wl.display);
else if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_WRITE))
- wl_display_flush(ewd-wl.display);
+ {
+ret = wl_display_flush(ewd-wl.display);
+if (ret == 0)
+  ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ);
+else if (ret == -1  errno != EAGAIN)
+  {
+/* FIXME: need do error processing? */
+  }
+ }
 
return ECORE_CALLBACK_RENEW;
 }
-- 
1.7.9.5

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel