[PATCH 2/2] Add wayland-protocol.h

2011-04-29 Thread Casey Dahlin
This file can store flag values and such constants as are useful to have at
both ends of the protocol.
---
 wayland/Makefile.am|1 +
 wayland/wayland-client.h   |1 +
 wayland/wayland-protocol.h |   30 ++
 wayland/wayland-server.h   |1 +
 4 files changed, 33 insertions(+), 0 deletions(-)
 create mode 100644 wayland/wayland-protocol.h

diff --git a/wayland/Makefile.am b/wayland/Makefile.am
index ed31dfc..be6d6ab 100644
--- a/wayland/Makefile.am
+++ b/wayland/Makefile.am
@@ -7,6 +7,7 @@ include_HEADERS =   \
wayland-server.h\
wayland-client-protocol.h   \
wayland-client.h\
+   wayland-protocol.h  \
wayland-egl.h
 
 libwayland_util_la_SOURCES =   \
diff --git a/wayland/wayland-client.h b/wayland/wayland-client.h
index f1ac797..ae1e926 100644
--- a/wayland/wayland-client.h
+++ b/wayland/wayland-client.h
@@ -45,6 +45,7 @@ void wl_proxy_set_user_data(struct wl_proxy *proxy, void 
*user_data);
 void *wl_proxy_get_user_data(struct wl_proxy *proxy);
 
 #include wayland-client-protocol.h
+#include wayland-protocol.h
 
 #define WL_DISPLAY_READABLE 0x01
 #define WL_DISPLAY_WRITABLE 0x02
diff --git a/wayland/wayland-protocol.h b/wayland/wayland-protocol.h
new file mode 100644
index 000..7660779
--- /dev/null
+++ b/wayland/wayland-protocol.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright © 2011 Casey Dahlin
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided as
+ * is without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _WAYLAND_PROTOCOL_H
+#define _WAYLAND_PROTOCOL_H
+
+#define WL_OUTPUT_HORIZFLIP 0x01
+#define WL_OUTPUT_VERTFLIP  0x02
+#define WL_OUTPUT_CWROTATE  0x04
+
+#endif
diff --git a/wayland/wayland-server.h b/wayland/wayland-server.h
index 649bb6b..2026c6a 100644
--- a/wayland/wayland-server.h
+++ b/wayland/wayland-server.h
@@ -30,6 +30,7 @@ extern C {
 #include stdint.h
 #include wayland-util.h
 #include wayland-server-protocol.h
+#include wayland-protocol.h
 
 enum {
WL_EVENT_READABLE = 0x01,
-- 
1.7.5

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


[PATCH 1/2] Add to output protocol to allow rotate/resize

2011-04-29 Thread Casey Dahlin
Adds some parameters to the output geometry event. Also adds a move method to
change those parameters.
---
 protocol/wayland.xml |   15 ---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/protocol/wayland.xml b/protocol/wayland.xml
index 11976fa..187e961 100644
--- a/protocol/wayland.xml
+++ b/protocol/wayland.xml
@@ -446,12 +446,21 @@
published as global during start up, or when a screen is hot
plugged.  --
   interface name=wl_output version=1
-!-- Notification about the screen size. --
+!-- Move or rotate this output's area --
+request name=move
+  arg name=x type=int/
+  arg name=y type=int/
+  arg name=transform_flags type=uint/
+/request
+
+!-- Notification about the screen size, rotation, and applied
+transformations. --
 event name=geometry
   arg name=x type=int/
   arg name=y type=int/
-  arg name=width type=int/
-  arg name=height type=int/
+  arg name=transform_flags type=uint/
+  arg name=width type=uint/
+  arg name=height type=uint/
 /event
   /interface
 
-- 
1.7.5

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


[PATCH 1/2] Add support for move method on outputs

2011-04-29 Thread Casey Dahlin
Outputs can now be rotated, flipped, and shifted by using the new move method
of the output interface.
---
 clients/window.c|3 +-
 compositor/compositor-wayland.c |4 +-
 compositor/compositor.c |   97 --
 compositor/compositor.h |3 +-
 4 files changed, 77 insertions(+), 30 deletions(-)

diff --git a/clients/window.c b/clients/window.c
index 9d0b753..33dbc94 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1523,7 +1523,8 @@ window_set_buffer_type(struct window *window, enum 
window_buffer_type type)
 static void
 display_handle_geometry(void *data,
struct wl_output *output,
-   int32_t x, int32_t y, int32_t width, int32_t height)
+   int32_t x, int32_t y, uint32_t tflags,
+   uint32_t width, uint32_t height)
 {
struct display *display = data;
 
diff --git a/compositor/compositor-wayland.c b/compositor/compositor-wayland.c
index 4093f2a..508ea88 100644
--- a/compositor/compositor-wayland.c
+++ b/compositor/compositor-wayland.c
@@ -283,8 +283,8 @@ cleanup_output:
 static void
 display_handle_geometry(void *data,
struct wl_output *output,
-   int32_t x, int32_t y,
-   int32_t width, int32_t height)
+   int32_t x, int32_t y, uint32_t tflags,
+   uint32_t width, uint32_t height)
 {
struct wayland_compositor *c = data;
 
diff --git a/compositor/compositor.c b/compositor/compositor.c
index df25407..4f0912f 100644
--- a/compositor/compositor.c
+++ b/compositor/compositor.c
@@ -113,6 +113,16 @@ wlsc_matrix_scale(struct wlsc_matrix *matrix, GLfloat x, 
GLfloat y, GLfloat z)
 }
 
 static void
+wlsc_matrix_rotate_90ccw(struct wlsc_matrix *matrix)
+{
+   struct wlsc_matrix rot = {
+   { 0, -1, 0, 0,  1, 0, 0, 0,  0, 0, 1, 0,  0, 0, 0, 1 }
+   };
+
+   wlsc_matrix_multiply(matrix, rot);
+}
+
+static void
 wlsc_matrix_transform(struct wlsc_matrix *matrix, struct wlsc_vector *v)
 {
int i, j;
@@ -649,7 +659,7 @@ wlsc_output_damage(struct wlsc_output *output)
pixman_region32_union_rect(compositor-damage_region,
   compositor-damage_region,
   output-x, output-y,
-  output-width, output-height);
+  output-swidth, output-sheight);
wlsc_compositor_schedule_repaint(compositor);
 }
 
@@ -687,8 +697,8 @@ fade_output(struct wlsc_output *output,
surface.compositor = compositor;
surface.x = output-x;
surface.y = output-y;
-   surface.width = output-width;
-   surface.height = output-height;
+   surface.width = output-swidth;
+   surface.height = output-sheight;
surface.texture = GL_NONE;
 
if (tint = 1.0)
@@ -727,7 +737,7 @@ wlsc_output_repaint(struct wlsc_output *output)
pixman_region32_intersect_rect(new_damage,
   ec-damage_region,
   output-x, output-y,
-  output-width, output-height);
+  output-swidth, output-sheight);
pixman_region32_subtract(ec-damage_region,
 ec-damage_region, new_damage);
pixman_region32_union(total_damage, new_damage,
@@ -754,8 +764,8 @@ wlsc_output_repaint(struct wlsc_output *output)
}
}
 
-   if (es-width  output-width ||
-   es-height  output-height)
+   if (es-width  output-swidth ||
+   es-height  output-sheight)
glClear(GL_COLOR_BUFFER_BIT);
wlsc_surface_draw(es, output, total_damage);
} else {
@@ -893,9 +903,10 @@ wlsc_surface_assign_output(struct wlsc_surface *es)
struct wlsc_output *tmp = es-output;
es-output = NULL;
 
+
wl_list_for_each(output, ec-output_list, link) {
-   if (output-x  es-x  es-x  output-x + output-width 
-   output-y  es-y  es-y  output-y + output-height) {
+   if (output-x  es-x  es-x  output-x + output-swidth 
+   output-y  es-y  es-y  output-y + output-sheight) {
if (output != tmp)
printf(assiging surface %p to output %p\n,
   es, output);
@@ -928,8 +939,8 @@ surface_attach(struct wl_client *client,
es-buffer = buffer;
switch (es-map_type) {
case WLSC_SURFACE_MAP_FULLSCREEN:
-   es-x = (es-fullscreen_output-width - es-width) / 2;
-   es-y = (es-fullscreen_output-height - es-height) / 2;
+   es-x = (es-fullscreen_output-swidth - es-width) / 2;
+   es-y = (es-fullscreen_output-sheight - 

[PATCH 2/2] Add flip client

2011-04-29 Thread Casey Dahlin
The flip client provides access to the move method of the output interface, and
lets you rotate, flip, and shift the screen view.
---
 clients/.gitignore  |1 +
 clients/Makefile.am |4 ++
 clients/flip.c  |  104 +++
 3 files changed, 109 insertions(+), 0 deletions(-)
 create mode 100644 clients/flip.c

diff --git a/clients/.gitignore b/clients/.gitignore
index fe7546d..419f05b 100644
--- a/clients/.gitignore
+++ b/clients/.gitignore
@@ -12,3 +12,4 @@ simple-client
 smoke
 terminal
 view
+flip
diff --git a/clients/Makefile.am b/clients/Makefile.am
index ca11be3..6dd5b5a 100644
--- a/clients/Makefile.am
+++ b/clients/Makefile.am
@@ -2,6 +2,7 @@ noinst_PROGRAMS =   \
gears   \
flower  \
screenshot  \
+   flip\
terminal\
image   \
$(poppler_programs) \
@@ -39,6 +40,9 @@ flower_LDADD = $(toolkit_libs)
 screenshot_SOURCES = screenshot.c screenshooter-protocol.c
 screenshot_LDADD = $(toolkit_libs)
 
+flip_SOURCES = flip.c
+flip_LDADD = $(CLIENT_LIBS) -lrt -lm
+
 terminal_SOURCES = terminal.c
 terminal_LDADD = $(toolkit_libs) -lutil
 
diff --git a/clients/flip.c b/clients/flip.c
new file mode 100644
index 000..5903a81
--- /dev/null
+++ b/clients/flip.c
@@ -0,0 +1,104 @@
+/*
+ * Copyright © 2011 Casey Dahlin
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided as
+ * is without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#include stdint.h
+#include stdlib.h
+#include stdio.h
+#include string.h
+#include fcntl.h
+#include glib.h
+
+#include wayland-client.h
+
+static void
+handle_global(struct wl_display *display, uint32_t id,
+ const char *interface, uint32_t version, void *data)
+{
+   struct wl_output **output = data;
+
+   if (strcmp(interface, wl_output) == 0)
+   *output = wl_output_create(display, id, 1);
+}
+
+int main(int argc, char *argv[])
+{
+   struct wl_display *display;
+   struct wl_output *output;
+   int x = 0, y = 0, flags = 0, i;
+   int had_nums = 0;
+   char *end = ;
+
+   for (i = 1; i  argc; i++) {
+   if (! strcmp(argv[i], --hflip)) {
+   flags |= WL_OUTPUT_HORIZFLIP;
+   } else if (! strcmp(argv[i], --vflip)) {
+   flags |= WL_OUTPUT_VERTFLIP;
+   } else if (! strcmp(argv[i], --rotatecw)) {
+   flags |= WL_OUTPUT_CWROTATE;
+   } else if (had_nums == 2) {
+   fprintf(stderr, too many arguments\n);
+   goto usage;
+   } else if (had_nums++ == 1) {
+   y = strtoll(argv[i], end, 0);
+   } else {
+   x = strtoll(argv[i], end, 0);
+   }
+
+   if (*end) {
+   fprintf(stderr, coordinates must be numeric\n);
+   goto usage;
+   }
+   }
+
+   if (had_nums == 1)
+   goto usage;
+
+   display = wl_display_connect(NULL);
+   if (display == NULL) {
+   fprintf(stderr, failed to create display: %m\n);
+   return -1;
+   }
+
+   output = NULL;
+   wl_display_add_global_listener(display, handle_global, output);
+   wl_display_iterate(display, WL_DISPLAY_READABLE);
+   if (output == NULL) {
+   fprintf(stderr, output not found\n);
+   return -1;
+   }
+
+   wl_output_move(output, x, y, flags);
+   wl_display_iterate(display, WL_DISPLAY_WRITABLE);
+   wl_display_destroy(display);
+
+   return 0;
+usage:
+   fprintf(stderr,
+   Usage: %s [--hflip] [--vflip] 

Re: [PATCH 2/2] Add wayland-protocol.h

2011-04-29 Thread Benjamin Franzke
2011/4/29 Casey Dahlin cdah...@redhat.com:
 This file can store flag values and such constants as are useful to have at
 both ends of the protocol.
 ---
  wayland/Makefile.am        |    1 +
  wayland/wayland-client.h   |    1 +
  wayland/wayland-protocol.h |   30 ++
  wayland/wayland-server.h   |    1 +
  4 files changed, 33 insertions(+), 0 deletions(-)
  create mode 100644 wayland/wayland-protocol.h

 diff --git a/wayland/Makefile.am b/wayland/Makefile.am
 index ed31dfc..be6d6ab 100644
 --- a/wayland/Makefile.am
 +++ b/wayland/Makefile.am
 @@ -7,6 +7,7 @@ include_HEADERS =                               \
        wayland-server.h                        \
        wayland-client-protocol.h               \
        wayland-client.h                        \
 +       wayland-protocol.h                      \
        wayland-egl.h

  libwayland_util_la_SOURCES =                   \
 diff --git a/wayland/wayland-client.h b/wayland/wayland-client.h
 index f1ac797..ae1e926 100644
 --- a/wayland/wayland-client.h
 +++ b/wayland/wayland-client.h
 @@ -45,6 +45,7 @@ void wl_proxy_set_user_data(struct wl_proxy *proxy, void 
 *user_data);
  void *wl_proxy_get_user_data(struct wl_proxy *proxy);

  #include wayland-client-protocol.h
 +#include wayland-protocol.h

  #define WL_DISPLAY_READABLE 0x01
  #define WL_DISPLAY_WRITABLE 0x02
 diff --git a/wayland/wayland-protocol.h b/wayland/wayland-protocol.h
 new file mode 100644
 index 000..7660779
 --- /dev/null
 +++ b/wayland/wayland-protocol.h
 @@ -0,0 +1,30 @@
 +/*
 + * Copyright © 2011 Casey Dahlin
 + *
 + * Permission to use, copy, modify, distribute, and sell this software and 
 its
 + * documentation for any purpose is hereby granted without fee, provided that
 + * the above copyright notice appear in all copies and that both that 
 copyright
 + * notice and this permission notice appear in supporting documentation, and
 + * that the name of the copyright holders not be used in advertising or
 + * publicity pertaining to distribution of the software without specific,
 + * written prior permission.  The copyright holders make no representations
 + * about the suitability of this software for any purpose.  It is provided 
 as
 + * is without express or implied warranty.
 + *
 + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS 
 SOFTWARE,
 + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
 + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 
 USE,
 + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
 + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 
 PERFORMANCE
 + * OF THIS SOFTWARE.
 + */
 +
 +#ifndef _WAYLAND_PROTOCOL_H
 +#define _WAYLAND_PROTOCOL_H
 +
 +#define WL_OUTPUT_HORIZFLIP 0x01
 +#define WL_OUTPUT_VERTFLIP  0x02
 +#define WL_OUTPUT_CWROTATE  0x04
 +

Flags should be enumerated in the protocol.
So we'd need to extend wayland-scanner to allow that.

 +#endif
 diff --git a/wayland/wayland-server.h b/wayland/wayland-server.h
 index 649bb6b..2026c6a 100644
 --- a/wayland/wayland-server.h
 +++ b/wayland/wayland-server.h
 @@ -30,6 +30,7 @@ extern C {
  #include stdint.h
  #include wayland-util.h
  #include wayland-server-protocol.h
 +#include wayland-protocol.h

  enum {
        WL_EVENT_READABLE = 0x01,
 --
 1.7.5

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

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


Re: will wayland support multi plane?

2011-04-29 Thread Marcus Lorentzon

Hi,
compositor-drm is just another Wayland demo compositor backend. The -drm 
one is a backend for DRM/KMS, just as the -x11 and -openwfd are backends 
for those APIs.


/BR
/Marcus

On 04/29/2011 03:24 AM, Zhao, Juan J wrote:

That looks great!:)
One simple question, what is compositor-drm? Is that one drm kernel
module special for wayland?

On Thu, 2011-04-28 at 12:51 +0200, Benjamin Franzke wrote:
   

Yeah, we'll work on integrating the kms overlay stuff, thats talked
about on dri-devel [1], into compositor-drm as well as
compositor-openwfd.

[1] http://lists.freedesktop.org/archives/dri-devel/2011-April/010559.html

Ben

2011/4/28 Marcus Lorentzonmarcus.xm.lorent...@stericsson.com:
 

On 04/28/2011 11:27 AM, Zhao, Juan J wrote:
   

Hi there,
Some embedded system provide more than one plan to work at the same
time to get better performance. For example, one video running on one
plane and one other video or graphics run on the other plane.
Will wayland take this to be considered? One video on plane A, one
window on Plane B, and the cursor in on Plane C


 

Maybe the new OpenWF Display compositor will make this possible. As I
understand, overlays are not standard in KMS, but by abstracting KMS with
OpenWFD, any vendor providing OpenWFD drivers with multiple pipes should be
able to get overlays in the demo wayland compositor (as long as the
compositor is extended to make use of multiple pipes).

See
http://cgit.freedesktop.org/wayland/wayland-demos/tree/compositor/compositor-openwfd.c.

I guess Ben can give more details on the target of this new compositor.

/BR
/Marcus


   


   


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


[no subject]

2011-04-29 Thread Jonas -

Will wayland support Hybritgpu ? gpu on board or apu and for games pcie?
  ___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


RE:

2011-04-29 Thread Jonas -

too switch gpu's? to save energie
  ___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: will Wayland Support 'Hybrid' GPU switching systems

2011-04-29 Thread cat
there hasn't been any on the subject but I think that most of the work would
be in kernel space, I think that some of these gpu switching systems use
GPUs from different manufacturers (EX. ATI + Intel), so it is not clear if
every instance of this feature is driver dependant or not. if its not
though, it would still likely requier kernel space operations
On Fri, Apr 29, 2011 at 3:37 AM, Jonas - roteockto...@hotmail.com wrote:

  too switch gpu's? to save energie

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


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


Re: [PATCH 1/2] Add to output protocol to allow rotate/resize

2011-04-29 Thread Casey Dahlin
On Fri, Apr 29, 2011 at 09:43:53AM +0200, Benjamin Franzke wrote:
 2011/4/29 Casey Dahlin cdah...@redhat.com:
  Adds some parameters to the output geometry event. Also adds a move method 
  to
  change those parameters.
  ---
   protocol/wayland.xml |   15 ---
   1 files changed, 12 insertions(+), 3 deletions(-)
 
  diff --git a/protocol/wayland.xml b/protocol/wayland.xml
  index 11976fa..187e961 100644
  --- a/protocol/wayland.xml
  +++ b/protocol/wayland.xml
  @@ -446,12 +446,21 @@
         published as global during start up, or when a screen is hot
         plugged.  --
    interface name=wl_output version=1
  -    !-- Notification about the screen size. --
  +    !-- Move or rotate this output's area --
  +    request name=move
  +      arg name=x type=int/
  +      arg name=y type=int/
  +      arg name=transform_flags type=uint/
  +    /request
 
 I think we need a general debate first, about how to grant permission
 to only specific clients to change output configuration.
 Or even not making it part of the main protocol at all, just being an
 extension or so.
 We might not want every application to have control of these things.
 

xrandr doesn't seem to have much more authentication than this. Its not much
more dangerous than changing the resolution, which many fairly pedestrian apps
expect to be able to do (i.e. games). Indeed its potentially a good deal less
dangerous than fullscreen mode (though that can be fixed with UI), far less
dangerous than screenshots from a security perspective (and we can't have
clients render certain effects if they can't get a copy of what's behind them
to distort), and even a good deal safer than input grabs.

  +
  +    !-- Notification about the screen size, rotation, and applied
  +        transformations. --
      event name=geometry
        arg name=x type=int/
        arg name=y type=int/
  -      arg name=width type=int/
  -      arg name=height type=int/
  +      arg name=transform_flags type=uint/
  +      arg name=width type=uint/
  +      arg name=height type=uint/
      /event
    /interface
 
 Why changing the width and height datatype within this patch?
 That would be another patch. But Kristian denied that somewhen already.
 

Oh yeah, I did do that didn't I? X( I'll kill it in the revision.

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


Re: [PATCH 1/2] Add to output protocol to allow rotate/resize

2011-04-29 Thread Kristian Høgsberg
On Fri, Apr 29, 2011 at 11:35 AM, Casey Dahlin cdah...@redhat.com wrote:
 On Fri, Apr 29, 2011 at 09:43:53AM +0200, Benjamin Franzke wrote:
 2011/4/29 Casey Dahlin cdah...@redhat.com:
  Adds some parameters to the output geometry event. Also adds a move method 
  to
  change those parameters.
  ---
   protocol/wayland.xml |   15 ---
   1 files changed, 12 insertions(+), 3 deletions(-)
 
  diff --git a/protocol/wayland.xml b/protocol/wayland.xml
  index 11976fa..187e961 100644
  --- a/protocol/wayland.xml
  +++ b/protocol/wayland.xml
  @@ -446,12 +446,21 @@
         published as global during start up, or when a screen is hot
         plugged.  --
    interface name=wl_output version=1
  -    !-- Notification about the screen size. --
  +    !-- Move or rotate this output's area --
  +    request name=move
  +      arg name=x type=int/
  +      arg name=y type=int/
  +      arg name=transform_flags type=uint/
  +    /request

 I think we need a general debate first, about how to grant permission
 to only specific clients to change output configuration.
 Or even not making it part of the main protocol at all, just being an
 extension or so.
 We might not want every application to have control of these things.


 xrandr doesn't seem to have much more authentication than this. Its not much
 more dangerous than changing the resolution, which many fairly pedestrian apps
 expect to be able to do (i.e. games). Indeed its potentially a good deal less
 dangerous than fullscreen mode (though that can be fixed with UI), far less
 dangerous than screenshots from a security perspective (and we can't have
 clients render certain effects if they can't get a copy of what's behind them
 to distort), and even a good deal safer than input grabs.

Apps shouldn't generally change the *default* resolution.  Games and
such may want to show their window at the native resolution and that's
part of the fullscreen plan:

  http://lists.freedesktop.org/archives/wayland-devel/2010-November/000117.html

Of course, the DE config tool will want to be able to change the
default mode and placement of monitors.  In that case we're talking
about a specific DE with it's own display configuration tool, and
perhaps the tool can just update the underlying config (GConf or so)
and the compositor picks up the change from there.  As a first step
I'd rather just add the extra info to wl_output (list of available
modes, refresh rates, sub pixel layout, connector name etc), and punt
on how to change it for now.

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