[PATCH 1/2] clients: Maximize window when double click on title bar

2014-06-11 Thread Xiong Zhang
From: Xiong Zhang Signed-off-by: Xiong Zhang --- clients/window.c| 26 +- shared/cairo-util.h | 4 shared/frame.c | 31 +++ 3 files changed, 60 insertions(+), 1 deletion(-) diff --git a/clients/window.c b/clients/window.c

[PATCH 2/2] clients: Maximize window when double touch on title bar

2014-06-11 Thread Xiong Zhang
Signed-off-by: Xiong Zhang --- clients/window.c| 26 -- shared/cairo-util.h | 7 +++ shared/frame.c | 49 + 3 files changed, 80 insertions(+), 2 deletions(-) diff --git a/clients/window.c b/clients/window.c

[PATCH v2 02/12] shell.c: Restore maximized and fullscreen window on destroyed output

2014-03-07 Thread Xiong Zhang
;s size to target output. Signed-off-by: Xiong Zhang --- desktop-shell/shell.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index bee1b0b..d5d6eab 100644 --- a/desktop-shell/shell.c +++ b/desktop-she

[PATCH 11/12] compositor: Hot plug a output in clone mode

2014-03-07 Thread Xiong Zhang
ade from master to clone. Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 9 +++- src/compositor.c | 61 ++-- src/compositor.h | 2 ++ 3 files changed, 64 insertions(+), 8 deletions(-) diff --git a/src/compositor-drm.c b/

[PATCH 10/12] compositor-drm: Deal with VT switch in clone mode

2014-03-07 Thread Xiong Zhang
Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index de777b3..58a0efa 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -2376,7 +2376,7

[PATCH 09/12] compositor: Output repaint in clone mode

2014-03-07 Thread Xiong Zhang
Because clone output isn't in compositor->output_list, all the repaint request are for master output. When master output repaint, all the associated clone output must repaint also. Signed-off-by: Xiong Zhang --- src/compositor.c | 17 ++--- 1 file changed, 14 insertio

[PATCH 00/12] implement per connector clone mode

2014-03-07 Thread Xiong Zhang
Oliveira (3): compositor: Move output positining logic out of the backends compositor: Add output to the compositor output list in the core compositor: Track damage properly for overlapping outputs Xiong Zhang (9): shell.c: Set dirty for visible views on destroyed output shell.c: Restore ma

[PATCH 01/12] shell.c: Set dirty for visible views on destroyed output

2014-03-07 Thread Xiong Zhang
The geometry for visible views will keep unchanged, weston_view_set_position() doesn't mark these views as dirty. So there is no chance for them to reassign output, then these views will disappear. Signed-off-by: Xiong Zhang --- desktop-shell/shell.c | 6 -- 1 file changed, 4 inser

[PATCH 04/12] compositor: Add output to the compositor output list in the core

2014-03-07 Thread Xiong Zhang
From: Ander Conselvan de Oliveira Previously the insertion was done by the backends, with a potential crash in the error path. Calls to weston_output_destroy() would try to remove the output from the compositor list before it was actually inserted. This patch moves the insertion to weston_output

[PATCH 05/12] compositor: Track damage properly for overlapping outputs

2014-03-07 Thread Xiong Zhang
From: Ander Conselvan de Oliveira The assumption that there are no overlapping outputs allows damage to be kept in a compositor-wide region that is cleared by the backends after output repaint. When outputs overlap, however, the repaint of one output clears the damage for the overlapping region b

[PATCH 07/12] compositor: Add per connector clone mode support

2014-03-07 Thread Xiong Zhang
put. Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 9 src/compositor.c | 114 ++- src/compositor.h | 9 weston.ini.in| 2 + 4 files changed, 115 insertions(+), 19 deletions(-) diff --git a/src/compositor-drm

[PATCH 02/12] shell.c: Restore maximized and fullscreen window on destroyed output

2014-03-07 Thread Xiong Zhang
;s size to target output. Signed-off-by: Xiong Zhang --- desktop-shell/shell.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index bee1b0b..02dd1b8 100644 --- a/desktop-shell/shell.c +++ b/desktop-she

[PATCH 06/12] compositor-drm: Abstract drm_output_set_mode()

2014-03-07 Thread Xiong Zhang
Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 45 +++-- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 78292a6..dd1c251 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c

[PATCH 03/12] compositor: Move output positining logic out of the backends

2014-03-07 Thread Xiong Zhang
From: Ander Conselvan de Oliveira Move the code for choosing the x and y of an output out of the backend into weston_output_init(). All the backends implement the same simple behavior, so this lets that code be in just one place. Signed-off-by: Ander Conselvan de Oliveira --- src/compositor-d

[PATCH 12/12] compositor: Output unplug in clone mode

2014-03-07 Thread Xiong Zhang
->output_list. Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 40 src/compositor.c | 46 ++ 2 files changed, 74 insertions(+), 12 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c in

[PATCH 08/12] compositor: Move all clone outputs when move master outptu

2014-03-07 Thread Xiong Zhang
Signed-off-by: Xiong Zhang --- src/compositor.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 402ac75..c9fe06c 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -3294,8 +3294,8 @@ weston_output_init_geometry(struct

[PATCH 7/9] compositor: Hot plug a output in clone mode

2014-02-13 Thread Xiong Zhang
If adding output is a slave output, this slave output share the fb with master output. If adding output is a master output, loop the output_list to find its slave output. If it has slave output, this slave output will change role from master to slave. Signed-off-by: Xiong Zhang --- clients

[PATCH 8/9] compositor: Handle background and panel surface in clone mode

2014-02-13 Thread Xiong Zhang
slave, the old master's background and panel view should be removed from view_list Signed-off-by: Xiong Zhang --- desktop-shell/shell.c | 70 +-- 1 file changed, 57 insertions(+), 13 deletions(-) diff --git a/desktop-shell/shell.c b/deskto

[PATCH 9/9] shell: set_fullscreen and set_maximized in clone mode

2014-02-13 Thread Xiong Zhang
if the assigned output is slave, change the assigned output to associated master output Signed-off-by: Xiong Zhang --- desktop-shell/shell.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 2bc1856..0edefbd

[PATCH 2/9] compositor: Output repaint in clone mode

2014-02-13 Thread Xiong Zhang
obj can be released. Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 112 ++- src/compositor.c | 3 +- 2 files changed, 112 insertions(+), 3 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 6773226..ce85aec 10064

[PATCH 3/9] compositor-drm: Deal with VT switch in clone mode

2014-02-13 Thread Xiong Zhang
When system do VT switch, slave output should use master output's fb to restore mode. Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c

[PATCH 6/9] compositor-drm: Abstract drm_output_set_mode()

2014-02-13 Thread Xiong Zhang
Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 81 +++- 1 file changed, 29 insertions(+), 52 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 842710f..836f81d 100644 --- a/src/compositor-drm.c +++ b/src/compositor

[PATCH 4/9] compositor: Add output->role_change_signal in clone mode

2014-02-13 Thread Xiong Zhang
When a output change role between master and slave in clone mode, some work is needed, this signal is used to trigger this work. Signed-off-by: Xiong Zhang --- desktop-shell/shell.c | 13 + src/compositor.c | 1 + src/compositor.h | 1 + 3 files changed, 15 insertions

[PATCH 5/9] compositor: Output unplug in clone mode

2014-02-13 Thread Xiong Zhang
ll be upgraded to master output, moving output following unplugged output isn't necessay, views on unplugged output will be marked as dirty. Signed-off-by: Xiong Zhang --- desktop-shell/shell.c | 13 ++- src/compositor-drm.c | 103 +

[PATCH 1/9] compositor-drm: Add per connector clone mode support

2014-02-13 Thread Xiong Zhang
e size, or else the mode setting for slave output will fail. So slave output's mode will be adjusted when it is necessary. Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 189 --- src/compositor.c | 15 +++- src/compositor.h | 5 +

[PATCH 1/2] shell.c: Restore maximized and fullscreen window in xdg_shell correctly

2014-02-12 Thread Xiong Zhang
alues in surface->configure(), at this point surface->width and surface->height have been changed to maximized and fullscreen buffer size in weston_surface_commit(). This patch change calling set_full_output from set_surface_type to set_maximized() and set_fullscreen(). Signed-off-by: Xiong

[PATCH 2/2] shell.c: restore maximized and fullscreen window on destroyed output

2014-02-12 Thread Xiong Zhang
to target output. Signed-off-by: Xiong Zhang --- desktop-shell/shell.c | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 9ecd15a..c5d722a 100644 --- a/desktop-shell/shell.c +++ b/desktop-she

[PATCH] compositor: Ensure views on hiden workspace are listening correct output

2013-12-19 Thread Xiong Zhang
he system will dead loop on the listener list of this output signal. Signed-off-by: Xiong Zhang --- src/compositor.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 6ca297a..9929be1 100644 --- a/src/compositor.c +++ b/src/com

[PATCH] compositor-drm: free drm_mode in drm_output_destroy

2013-12-15 Thread Xiong Zhang
When drm_output is destroyed, we should free drm_mode to avoid memoey leakage. Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index fbf6e49..9af8f8d 100644 --- a/src/compositor-drm.c

[PATCH 2/3] shell: restore app on default and unplugged output

2013-12-02 Thread Xiong Zhang
output should be moved also. Because of the page flip intervention, the weston_output_destroy() maybe asynchronous with update_outputs(). So we should change moving following outputs to output_destroy handler. Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 8 - src/compositor.c

[PATCH 3/3] shell: restore app when workspace_num > 1 on unplugged output

2013-12-02 Thread Xiong Zhang
utput the surface belonged to. Add a weston_surface->restore_output to save the correct output in above situation, so that these surface on hiden workspace can be restored correctly on destroyed output. Signed-off-by: Xiong Zhang --- src/compositor.c | 2 ++ src/compositor.h | 6 ++ src/shell.c

[PATCH 1/3] shell: restore app on non default and unplugged output

2013-12-02 Thread Xiong Zhang
if the unplugged output isn't the default output, move cursor and APP widow to default output Signed-off-by: Xiong Zhang --- src/shell.c | 190 ++-- 1 file changed, 186 insertions(+), 4 deletions(-) diff --git a/src/shell.c b/src/sh

[PATCH] src/shell.c: set black_surface->width and height

2013-11-28 Thread Xiong Zhang
see a full screen view whe APP window's size isn't equal to output's size like running weston-gears Signed-off-by: Xiong Zhang --- src/shell.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shell.c b/src/shell.c index 605f090..ebcf3e2 100644 --- a/src/shell.c +++

[PATCH 2/4] client/dnd.c: add dnd support for touch screen in client

2013-11-25 Thread Xiong Zhang
From: XiongZhang Adding the interface for touch screen event in clients/dnd.c, once user touch down on this app, it will trigger a touch and drag operation. Signed-off-by: Xiong Zhang Reviewed-by: Kristian Hogsberg --- clients/dnd.c| 56

[PATCH 4/4] terminal: add touch screen selection support

2013-11-25 Thread Xiong Zhang
From: XiongZhang Signed-off-by: Xiong Zhang Reviewed-by: Kristian Hogsberg --- clients/terminal.c | 85 ++ 1 file changed, 67 insertions(+), 18 deletions(-) diff --git a/clients/terminal.c b/clients/terminal.c index e7dcd91..94dcb4b 100644

[PATCH 1/4] src/data_device.c: add dnd support for touch screen

2013-11-25 Thread Xiong Zhang
From: XiongZhang Adding the drag and drop grab interface for touch screen in src/data-device.c, so the server can handle touch screen drag and drop operation. Signed-off-by: Xiong Zhang Reviewed-by: Kristian Hogsberg --- src/compositor.h | 7 +- src/data-device.c | 347

[PATCH 3/4] distinguish touch screen and pointer dnd in client

2013-11-25 Thread Xiong Zhang
#x27;t identify the drag and drop event is generated by touch screen or pointer. Signed-off-by: Xiong Zhang Reviewed-by: Kristian Hogsberg --- clients/dnd.c | 3 ++- clients/window.c | 65 --- clients/window.h | 6 + src/data-

[PATCH] src/Makefile.am: correct compile failure for launcher-util.c

2013-11-24 Thread Xiong Zhang
The following error message is generated during compile In file included from launcher-util.c:43:0: compositor.h:35:28: fatal error: wayland-server.h: No such file or directory #include Signed-off-by: Xiong Zhang --- src/Makefile.am |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 6/6] shell: restore app when workspace_num > 1 on unplugged output

2013-10-22 Thread Xiong Zhang
utput the surface belonged to. Add a weston_surface->restore_output to save the correct output in above situation, so that these surface on hiden workspace can be restored correctly on destroyed output. Signed-off-by: Xiong Zhang --- src/compositor.c | 2 ++ src/compositor.h | 6 ++ src/sh

[PATCH v2 5/6] window, desktop-shell: deal with output unplug on client side

2013-10-22 Thread Xiong Zhang
when output is removed, weston-desktop-shell should destroy panel and background surface on destroyed output. Signed-off-by: Xiong Zhang --- clients/desktop-shell.c | 20 clients/window.c| 32 clients/window.h| 3 +++ 3

[PATCH v2 3/6] shell: restroe app run on non default and unplugged output

2013-10-22 Thread Xiong Zhang
he child surface will be redrawed on next repainted Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 2 + src/shell.c | 139 +++ 2 files changed, 141 insertions(+) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index

[PATCH v2 4/6] shell: restroe app run on default and unplugged output

2013-10-22 Thread Xiong Zhang
, the surface on moved output should be moved also. V2: because of the page flip intervention, the weston_output_destroy() maybe asynchronous with update_outputs(). So move weston_output_move() calling function from update_outputs() to handle_output_destroy() Signed-off-by: Xiong

[PATCH v2 2/6] shell: register output->destroy_signal handler

2013-10-22 Thread Xiong Zhang
setup_output_destroy_handler() deal with output created at drm backend initialize time. handle_output_create() deal with output created by hot plug handler output_destroy_handler is removed when output was unplugged or shell is destroyed. Signed-off-by: Xiong Zhang --- src/shell.c | 75

[PATCH v2 1/6] compositor: set surface->plane from destroyed plane to NULL

2013-10-22 Thread Xiong Zhang
unmap(), so that all surfaces that have a non-NULL plane pointer wil be on compositor->surface_list (Kristian). bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69777 Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 6 +++--- src/compositor.c | 22 +- s

[PATCH v2 0/6] restore APP run on unplugged output

2013-10-22 Thread Xiong Zhang
hell_output -deal with child window, like subsurface, popup window -move weston_output_move() calling function from update_outputs() to handle_output_destroy() I test this patchset on two and three outputs, it works fine. But I maybe miss some window to restore. Xiong Zhang (6): compositor:

[PATCH 6/6] src/shell.c: restore app when workspace_num > 1 on unplugged output

2013-10-16 Thread Xiong Zhang
utput the surface belonged to. Add a weston_surface->restore_output to save the correct output in above situation, so that these surface on hiden workspace can be restored correctly on destroyed output. Signed-off-by: Xiong Zhang --- src/compositor.c | 2 ++ src/compositor.h | 6 ++ src/sh

[PATCH 3/6] src/shell.c: restroe app run on non default and unplugged output

2013-10-16 Thread Xiong Zhang
if the unplugged output isn't the default output, move cursor surface and APP widow to default output Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 2 + src/shell.c | 135 +++ 2 files changed, 137 insertions(+) diff --git

[PATCH 4/6] src/compositor.c shell.c: restroe app run on default and unplugged output

2013-10-16 Thread Xiong Zhang
surface on moved output should be moved also. Signed-off-by: Xiong Zhang --- src/compositor.c | 17 + src/shell.c | 44 +--- 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index

[PATCH 1/6] srccompositor.c: set surface->plane from destroyed plane to NULL

2013-10-16 Thread Xiong Zhang
sktop.org/show_bug.cgi?id=69777 v2: set surface->plane to NULL whose plane point to unplugged output, then change weston_surface_damage_below() to do nothing if surface->plane is NULL (Kristian) Signed-off-by: Xiong Zhang --- src/compositor.c | 22 +++--- src/comp

[PATCH 5/6] clients/window.c, desktop-shell.c: deal with output unplug on client side

2013-10-16 Thread Xiong Zhang
when output is removed, weston-desktop-shell should destroy panel and background surface on destroyed output. Signed-off-by: Xiong Zhang --- clients/desktop-shell.c | 20 clients/window.c| 32 clients/window.h| 3 +++ 3

[PATCH 2/6] src/shell.c: register output->destroy_signal handler

2013-10-16 Thread Xiong Zhang
setup_output_destroy_handler() deal with output created at drm backend initialize time. handle_output_create() deal with output created by hot plug handler output_destroy_handler is removed when output was unplugged or shell is destroyed. Signed-off-by: Xiong Zhang --- src/shell.c | 75

[PATCH 2/2] compositor.c: restore surface->plane from destroyed plane to primary plane

2013-10-10 Thread Xiong Zhang
l repaint this cursor_surface, segment fault will occure in weston_surface_damage_below() function. plane should track all the surfaces belonged to it, when plane is destroyed, restroe surface on destroyed plane to primary plane. bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69777 Signed-off-b

[PATCH 1/2] compositor-drm: avoid output_destroy happened before page_flip event

2013-10-10 Thread Xiong Zhang
output the segment fault will happpen in page_flip_handler() this patch add a variable drm_compositor->destroy_pending, if page flip event is pending when output remove event arrive, output_destroy will be delayed until page flip finished Signed-off-by: Xiong Zhang --- src/compositor-drm.c |

[PATCH 9/9] improve hotplug remove a output in clone mode

2013-09-17 Thread Xiong Zhang
t->destroy_pending to handle above situation. Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 51 ++- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 3594a1d..2c97a8a 100644

[PATCH 8/9] hot plug remove a output in clone mode

2013-09-17 Thread Xiong Zhang
if removed output is clone output, just delete this output if removed output is primary output, find a new primary output and adjust clone output's mode necessary Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 57 +++- 1 file change

[PATCH 7/9] maximize and fullscreen support in clone mode

2013-09-17 Thread Xiong Zhang
App can specify the output for maximize and fullscreen show, limited the output to primary output when clone mode enabled to avoid App assign a fault output Signed-off-by: Xiong Zhang --- src/shell.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/shell.c b/src

[PATCH 6/9] hot plug add a output in clone mode

2013-09-17 Thread Xiong Zhang
time, all surface should be dirty, so that all client can get frame callback and request repaint. Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 93 +++- src/compositor.c | 10 ++ src/compositor.h | 2 ++ 3 files changed, 82 inser

[PATCH 5/9] deal with VT switch in clone mode

2013-09-17 Thread Xiong Zhang
clone output should use primary output's fb to restore mode Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 0b9ab45..a9d2ab5 100644 --- a/src/compo

[PATCH 4/9] output gl repaint in clone mode

2013-09-17 Thread Xiong Zhang
Only repsone to primary output repaint request; Primary output and clone output share the same frame buffer, once primary output do page flip, clone output will do page flip also. When both primary output and clone output finish the page flip, the fb obj can be released. Signed-off-by: Xiong

[PATCH 3/9] one pointer exist in only one output

2013-09-17 Thread Xiong Zhang
one pointer can exist in only one output, once find the output, break the loop Signed-off-by: Xiong Zhang --- src/input.c | 7 +-- src/shell.c | 2 ++ src/zoom.c | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/input.c b/src/input.c index 85b772f..6b26f3c 100644

[PATCH 2/9] find primary output during drm_compositor_create in clone mode

2013-09-17 Thread Xiong Zhang
e_output will fail. choose a nearest mode below primary_output's mode. Signed-off-by: Xiong Zhang --- src/compositor-drm.c | 100 +-- 1 file changed, 97 insertions(+), 3 deletions(-) diff --git a/src/compositor-drm.c b/src/compositor-drm.c index

[PATCH 1/9] add multi-screen-mode option to weston.ini

2013-09-17 Thread Xiong Zhang
multi-screen-mode=clone/extend to control multi screen mode Signed-off-by: Xiong Zhang --- src/compositor.c | 9 + src/compositor.h | 7 +++ weston.ini | 1 + 3 files changed, 17 insertions(+) diff --git a/src/compositor.c b/src/compositor.c index 6a53984..f9e9ba1 100644

[PATCH 0/9] implement multi screen clone mode in drm-backend.so

2013-09-17 Thread Xiong Zhang
the theory for clone mode is: all the outputs share the same fb, when primary output do modeset and pageflip, clone output do this also. I fulfill repaint, VT switch and hotplug function. I don't implement dynamical setting output's mdoe. Xiong Zhang (9): add multi-screen-mode