Hi,

you can run "git am 0001-evdev-support-emulator.patch", I've attached the 
updated patch for weston 1.4

It's just a quick update of the old patch for weston 1.3, it does have some 
problems like movement lags though. Anyway, this
is temporary hack, the right fix will be implemented soon

On 04/01/2014 07:53 AM, [email protected] wrote:
> Hi,
> 
> Can some one help me with the location of file "evdev.c" to run the patch.. I 
> tried
> 
> Locate evdev.c
> 
> And
> 
> Find / -name evdev.c
> 
> Both didn't give a result..
> 
> I checked in /usr/src.. I couldn't find it there too..
> 
> Thanks..
> 
> 
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> *From: * Stanislav Vorobiov <[email protected]>;
> *To: * karthik karthik <[email protected]>; [email protected] 
> <[email protected]>;
> *Subject: * Re: Launch weston ivi shell - unresponsive homescreen..
> *Sent: * Mon, Mar 31, 2014 10:41:35 AM
> 
> Hi,
> 
> It's possibly because of this - https://bugs.tizen.org/jira/browse/TIVI-2248
> 
> Currently emulator's touchscreen has problems working with weston, so this 
> was worked around
> by the patch which is attached to that ticket. Since you've built weston 
> yourself (or used latest RPM)
> you didn't apply the patch and that's why homescreen is unresponsive.
> 
> On 03/31/2014 01:57 PM, karthik karthik wrote:
>> Hi,
>>
>> I tried to install weston ivi shell in tizen emulator. I am able to get the 
>> ivi screen with the homescreen button.
>>
>> But I am not able to launch/move to a new screen. It is as if the whole 
>> screen is inactive..
>>
>> I installed the rpm packages for ivi shell from tizen..
>>
>> Can someone help me in this ??
>>
>>
>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> *From: * Wang, Ning W <[email protected] <javascript:return>>;
>> *To: * karthik karthik <[email protected] <javascript:return>>; 
>> [email protected] <javascript:return> <[email protected] 
>> <javascript:return>>;
>> *Subject: * RE: RE: RE: RE: Error installing wayland.. in tizen emulator.
>> *Sent: * Mon, Mar 31, 2014 6:51:10 AM
>>
>> It should not cause any issue. You can run “rpm -qa | grep wayland” to 
>> double check the version.
>>
>> 
>>
>> Thanks,
>>
>> Ning
>>
>> *From:*karthik karthik [mailto:[email protected] 
>> <javascript:return>]
>> *Sent:* Monday, March 31, 2014 2:44 PM
>> *To:* Wang, Ning W; [email protected] <javascript:return>
>> *Subject:* Re: RE: RE: RE: Error installing wayland.. in tizen emulator.
>>
>> 
>>
>> Thanks ,
>>
>> But will the different architecture problem not cause any issues.
>>
>> Like, how to be sure that the latest installed wayland is used ??
>>
>> Thanks,
>>
>> 
>>
>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> *From: *Wang, Ning W <[email protected] <javascript:return> 
>> <javascript:return>>;
>> *To: *karthik karthik <[email protected] <javascript:return> 
>> <javascript:return>>; [email protected] <javascript:return> 
>> <javascript:return> <[email protected] <javascript:return> 
>> <javascript:return>>;
>> *Subject: *RE: RE: RE: Error installing wayland.. in tizen emulator.
>> *Sent: *Mon, Mar 31, 2014 6:31:08 AM
>>
>> 
>>
>> Oops.. I only saw the arch error at the first glance. In case you are 
>> upgrading a package, “-Uvh” should be used instead of “-ivh”.
>>
>> 
>>
>> Thanks,
>>
>> Ning
>>
>> *From:*karthik karthik [mailto:[email protected] 
>> <javascript:return> <javascript:return>]
>> *Sent:* Monday, March 31, 2014 2:16 PM
>> *To:* Wang, Ning W; [email protected] <javascript:return> 
>> <javascript:return>
>> *Subject:* Re: RE: RE: Error installing wayland.. in tizen emulator.
>>
>> 
>>
>> Hi,
>>
>> I am getting this error when I use the "ignorearch" option..
>>
>> Smackfs isn't mounted at (null). Going to the image build mode. Preparing... 
>> ######################################## file 
>> /usr/lib/libwayland-client.so.0 from install of 
>> libwayland-client-1.4.0-10.29.i686 conflicts with file from package
>> libwayland-client-1.3.0-10.1.i686
>>
>> Thanks.
>>
>> 
>>
>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> *From: *Wang, Ning W <[email protected] <javascript:return>>;
>> *To: *[email protected] <javascript:return> 
>> <[email protected] <javascript:return>>; [email protected] 
>> <javascript:return> <[email protected] <javascript:return>>;
>> *Subject: *RE: RE: Error installing wayland.. in tizen emulator.
>> *Sent: *Mon, Mar 31, 2014 5:58:17 AM
>>
>> 
>>
>> Please try with --ignorearch option “rpm –ivh foo.rpm --ignorearch”.
>>
>> 
>>
>> Thanks,
>>
>> Ning
>>
>> *From:*[email protected] <javascript:return> 
>> [mailto:[email protected] <javascript:return>]
>> *Sent:* Monday, March 31, 2014 1:51 PM
>> *To:* Wang, Ning W; [email protected] <javascript:return>
>> *Subject:* Re: RE: Error installing wayland.. in tizen emulator.
>>
>> 
>>
>> Hi,
>>
>> Initially I was using the packages from /daily/tizen/ivi/ivi-release. It 
>> didn't work.
>>
>> Then I used the address you had given below.
>>
>> This too is giving the same error.
>>
>> 
>>
>> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>
>> *From: *Wang, Ning W <[email protected] <javascript:return> 
>> <javascript:return>>;
>> *To: *[email protected] <javascript:return> <javascript:return> 
>> <[email protected] <javascript:return> <javascript:return>>; 
>> [email protected] <javascript:return> <javascript:return> 
>> <[email protected] <javascript:return>
> <javascript:return>>;
>> *Subject: *RE: Error installing wayland.. in tizen emulator.
>> *Sent: *Mon, Mar 31, 2014 5:21:09 AM
>>
>> 
>>
>> Did you download the packages from emulator repo like 
>> https://download.tizen.org/releases/daily/tizen/ivi/ivi/latest/repos/emul/ia32/packages/
>>  ?
>>
>> 
>>
>> Thanks,
>> Ning
>>
>> *From:*[email protected] <javascript:return> <javascript:return> 
>> [mailto:[email protected] <javascript:return> <javascript:return>] 
>> *On Behalf Of *[email protected] <javascript:return> 
>> <javascript:return>
>> *Sent:* Monday, March 31, 2014 12:30 PM
>> *To:* [email protected] <javascript:return> <javascript:return>
> 
>> *Subject:* Error installing wayland.. in tizen emulator.
>>
>> 
>>
>> Hi,
>>
>> I am trying to install wayland 1.40 on tizen emulator.. I am facing the 
>> following error..
>>
>> package libwayland-client-1.4.0-10.29.i686 is intended for a different 
>> architecture
>>
>> file /usr/lib/libwayland-client.so.0 from install of 
>> libwayland-client-1.4.0-10.29.i686 conflicts with file from package 
>> libwayland-client-1.3.0-10.1.i686
>>
>> package libwayland-cursor-1.4.0-10.29.i686 is intended for a different 
>> architecture
>>
>> file /usr/lib/libwayland-cursor.so.0.0.0 from install of 
>> libwayland-cursor-1.4.0-10.29.i686 conflicts with file from package 
>> libwayland-cursor-1.3.0-10.1.i686
>>
>> package libwayland-server-1.4.0-10.29.i686 is intended for a different 
>> architecture
>>
>> file /usr/lib/libwayland-server.so.0.1.0 from install of 
>> libwayland-server-1.4.0-10.29.i686 conflicts with file from package 
>> libwayland-server-1.3.0-10.1.i686
>>
>> How to solve this.. Should I remove wayland 1.3.0 before installing 1.4.0 ??
> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>>
>>
>> _______________________________________________
>> IVI mailing list
>> [email protected] <javascript:return>
>> https://lists.tizen.org/listinfo/ivi
> 
>>
> 

>From e2a252cd64a7d08070bb6b10a541459020ed84ad Mon Sep 17 00:00:00 2001
From: Stanislav Vorobiov <[email protected]>
Date: Tue, 1 Apr 2014 09:48:22 +0400
Subject: [PATCH] evdev: support emulator

---
 src/evdev.c |   52 +++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 37 insertions(+), 15 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index d9b7d32..5758dcd 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -34,8 +34,14 @@
 #include "compositor.h"
 #include "evdev.h"
 
+#define ABS_X 53
+#define ABS_Y 54
+
 #define DEFAULT_AXIS_STEP_DISTANCE wl_fixed_from_int(10)
 
+static int btn_down = 0;
+static int btn_changed = 0;
+
 void
 evdev_led_update(struct evdev_device *device, enum weston_led leds)
 {
@@ -127,7 +133,12 @@ evdev_flush_pending_event(struct evdev_device *device, uint32_t time)
 	case EVDEV_ABSOLUTE_MT_UP:
 		seat_slot = device->mt.slots[slot].seat_slot;
 		master->slot_map &= ~(1 << seat_slot);
-		notify_touch(master, time, seat_slot, 0, 0, WL_TOUCH_UP);
+		if (btn_changed) {
+			notify_button(device->seat,
+			      time, BTN_LEFT,
+			      btn_down ? WL_POINTER_BUTTON_STATE_PRESSED : WL_POINTER_BUTTON_STATE_RELEASED);
+			btn_changed = 0;
+		}
 		goto handled;
 	case EVDEV_ABSOLUTE_TOUCH_DOWN:
 		if (device->output == NULL)
@@ -156,6 +167,12 @@ evdev_flush_pending_event(struct evdev_device *device, uint32_t time)
 				     x, y, WL_TOUCH_MOTION);
 		else if (device->seat_caps & EVDEV_SEAT_POINTER)
 			notify_motion_absolute(master, time, x, y);
+		if (btn_changed) {
+			notify_button(device->seat,
+			      time, BTN_LEFT,
+			      btn_down ? WL_POINTER_BUTTON_STATE_PRESSED : WL_POINTER_BUTTON_STATE_RELEASED);
+			btn_changed = 0;
+		}
 		goto handled;
 	case EVDEV_ABSOLUTE_TOUCH_UP:
 		seat_slot = device->abs.seat_slot;
@@ -268,9 +285,11 @@ evdev_process_touch(struct evdev_device *device,
 
 static inline void
 evdev_process_absolute_motion(struct evdev_device *device,
-			      struct input_event *e)
+			      struct input_event *e,
+			      uint32_t time)
 {
 	int screen_width, screen_height;
+	int local_down;
 
 	if (device->output == NULL)
 		return;
@@ -280,19 +299,24 @@ evdev_process_absolute_motion(struct evdev_device *device,
 
 	switch (e->code) {
 	case ABS_X:
-		device->abs.x =
-			(e->value - device->abs.min_x) * screen_width /
-			(device->abs.max_x - device->abs.min_x);
+		device->abs.x = e->value;
 		if (device->pending_event == EVDEV_NONE)
 			device->pending_event = EVDEV_ABSOLUTE_MOTION;
 		break;
 	case ABS_Y:
-		device->abs.y =
-			(e->value - device->abs.min_y) * screen_height /
-			(device->abs.max_y - device->abs.min_y);
+		device->abs.y = e->value;
 		if (device->pending_event == EVDEV_NONE)
 			device->pending_event = EVDEV_ABSOLUTE_MOTION;
 		break;
+	case ABS_MT_TRACKING_ID:
+		local_down = (e->value > 0);
+		if (local_down ^ btn_down) {
+			btn_down = local_down;
+			btn_changed = 1;
+			if (!btn_down)
+				device->pending_event = EVDEV_ABSOLUTE_MT_UP;
+		}
+		break;
 	}
 }
 
@@ -356,7 +380,7 @@ evdev_process_absolute(struct evdev_device *device,
 	if (device->is_mt) {
 		evdev_process_touch(device, e, time);
 	} else {
-		evdev_process_absolute_motion(device, e);
+		evdev_process_absolute_motion(device, e, time);
 	}
 }
 
@@ -478,7 +502,7 @@ evdev_configure_device(struct evdev_device *device)
 	has_rel = 0;
 	has_abs = 0;
 	has_mt = 0;
-	has_button = 0;
+	has_button = 1;
 	has_keyboard = 0;
 	has_touch = 0;
 
@@ -512,9 +536,9 @@ evdev_configure_device(struct evdev_device *device)
 			      &absinfo);
 			device->abs.min_y = absinfo.minimum;
 			device->abs.max_y = absinfo.maximum;
-			device->is_mt = 1;
-			has_touch = 1;
-			has_mt = 1;
+			device->is_mt = 0;
+			has_touch = 0;
+			has_mt = 0;
 
 			if (!TEST_BIT(abs_bits, ABS_MT_SLOT)) {
 				device->mtdev = mtdev_new_open(device->fd);
@@ -555,8 +579,6 @@ evdev_configure_device(struct evdev_device *device)
 				break;
 			}
 		}
-		if (TEST_BIT(key_bits, BTN_TOUCH))
-			has_touch = 1;
 		for (i = BTN_MISC; i < BTN_JOYSTICK; i++) {
 			if (TEST_BIT(key_bits, i)) {
 				has_button = 1;
-- 
1.7.9.5

_______________________________________________
IVI mailing list
[email protected]
https://lists.tizen.org/listinfo/ivi

Reply via email to