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

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

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

2014-03-07 Thread Xiong Zhang
Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com --- 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

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

2014-03-07 Thread Xiong Zhang
-by: Xiong Zhang xiong.y.zh...@intel.com --- 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

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

2014-03-07 Thread Xiong Zhang
to target output. Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com --- 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

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

2014-03-07 Thread Xiong Zhang
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com 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

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

2014-03-07 Thread Xiong Zhang
. Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com --- 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

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

2014-03-07 Thread Xiong Zhang
Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com --- 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

[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 xiong.y.zh...@intel.com --- desktop-shell/shell.c | 6 -- 1 file

[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 ander.conselvan.de.olive...@intel.com 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 05/12] compositor: Track damage properly for overlapping outputs

2014-03-07 Thread Xiong Zhang
From: Ander Conselvan de Oliveira ander.conselvan.de.olive...@intel.com 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

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

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

[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 xiong.y.zh...@intel.com --- desktop-shell/shell.c | 13 + src/compositor.c | 1 + src/compositor.h | 1 + 3 files

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

2014-02-13 Thread Xiong Zhang
will 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 xiong.y.zh...@intel.com --- desktop-shell/shell.c | 13 ++- src/compositor-drm.c | 103

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

2014-02-13 Thread Xiong Zhang
be released. Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com --- 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

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

2014-02-13 Thread Xiong Zhang
setting for slave output will fail. So slave output's mode will be adjusted when it is necessary. Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com --- src/compositor-drm.c | 189 --- src/compositor.c | 15 +++- src/compositor.h | 5

[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 xiong.y.zh...@intel.com --- src/compositor-drm.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/compositor-drm.c b/src

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

2014-02-13 Thread Xiong Zhang
Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com --- 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

[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 xiong.y.zh...@intel.com --- 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

[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 xiong.y.zh

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

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

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

2014-02-12 Thread Xiong Zhang
output. Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com --- 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

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

2014-02-12 Thread Xiong Zhang
-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 Zhang xiong.y.zh...@intel.com

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

2013-12-19 Thread Xiong Zhang
loop on the listener list of this output signal. Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com --- 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

[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 xiong.y.zh...@intel.com --- 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

[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 xiong.y.zh...@intel.com --- src/shell.c | 190 ++-- 1 file changed, 186 insertions(+), 4 deletions(-) diff --git a/src

[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 xiong.y.zh...@intel.com --- src/compositor-drm.c | 8

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

2013-12-02 Thread Xiong Zhang
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 xiong.y.zh...@intel.com --- src/compositor.c | 2 ++ src/compositor.h | 6 ++ src/shell.c

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

2013-10-23 Thread Xiong Zhang
when output is removed, weston-desktop-shell should destroy panel and background surface on destroyed output. Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com --- clients/desktop-shell.c | 20 clients/window.c| 32 clients/window.h

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

2013-10-23 Thread Xiong Zhang
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 xiong.y.zh...@intel.com --- src/compositor.c | 2 ++ src/compositor.h | 6 ++ src

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

2013-10-22 Thread Xiong Zhang
-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: set surface-plane

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

2013-10-22 Thread Xiong Zhang
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 xiong.y.zh...@intel.com --- src/compositor-drm.c | 6 +++--- src/compositor.c | 22 +- src/compositor.h

[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 xiong.y.zh...@intel.com

[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 3/6] shell: restroe app run on non default and unplugged output

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

[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 xiong.y.zh...@intel.com

[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 xiong.y.zh...@intel.com --- clients/desktop-shell.c | 20 clients/window.c| 32 clients/window.h

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

2013-10-16 Thread Xiong Zhang
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 xiong.y.zh...@intel.com --- src/compositor.c | 22 +++--- src/compositor.h | 2 ++ 2 files changed, 21

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

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

[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 xiong.y.zh...@intel.com --- src/compositor-drm.c | 2 + src/shell.c | 135 +++ 2 files changed, 137

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

2013-10-16 Thread Xiong Zhang
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 xiong.y.zh...@intel.com --- src/compositor.c | 2 ++ src/compositor.h | 6 ++ src

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

2013-10-11 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 xiong.y.zh...@intel.com --- src

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

2013-10-11 Thread Xiong Zhang
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-by: Xiong Zhang

[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 option

[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 xiong.y.zh...@intel.com --- 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

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

2013-09-17 Thread Xiong Zhang
. choose a nearest mode below primary_output's mode. Signed-off-by: Xiong Zhang xiong.y.zh...@intel.com --- 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 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 xiong.y.zh...@intel.com --- 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

[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 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 xiong.y.zh...@intel.com --- 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

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

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

[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 xiong.y.zh...@intel.com --- src/shell.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

[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 xiong.y.zh...@intel.com --- src/compositor-drm.c | 57