Re: Clipboard and selection in wayland.

2013-03-11 Thread Yichao Yu
On Mon, Mar 11, 2013 at 2:25 PM, Bill Spitzak wrote: > Yichao Yu wrote: > >> I think the middle button paste function is very different from >> drag-and-drop. It's more like a auto-copy-clipboard. For >> drag-and-drop, the client that starts the dnd (therefore provide the >> data), should have foc

Re: server side callback

2013-03-11 Thread Jason Ekstrand
Guilio, The big problem here is that, unlike the server, events client-side are handled in multiple event loops. Server-side, everything is handled in a single event loop and events (at least on a per-client basis) are handled in order (I think this is even in the spec). On the client-side, where

server side callback

2013-03-11 Thread Giulio Camuffo
Hi all, I've been struggling with a problem these last few days: I'm working on QtWayland drag and drop support, and I noticed it requires some protocol additions, of which this is a draft: https://pastee.org/hxq26 I want the" wl_data_source.dropped" event to be called after the wl_data_device rec

Re: [PATCH] xRandr strikes back

2013-03-11 Thread Alex Deucher
On Mon, Mar 11, 2013 at 5:39 PM, Scott Moreau wrote: > > > On Mon, Mar 11, 2013 at 12:59 PM, Pekka Paalanen > wrote: >> >> On Sun, 10 Mar 2013 15:53:30 +0100 >> Hardening wrote: >> >> > This patch adds a wlrandr extension. It is useful to test >> > mode switching. The patch provides the weston-s

Re: [PATCH] xRandr strikes back

2013-03-11 Thread Scott Moreau
On Mon, Mar 11, 2013 at 12:59 PM, Pekka Paalanen wrote: > On Sun, 10 Mar 2013 15:53:30 +0100 > Hardening wrote: > > > This patch adds a wlrandr extension. It is useful to test > > mode switching. The patch provides the weston-switch-mode > > utility that can be use quite the same way as xrandr to

Re: Support XDG_RUNTIME_DIR being unset

2013-03-11 Thread Thiago Macieira
On segunda-feira, 11 de março de 2013 18.43.07, Emilio Pozuelo Monfort wrote: > Debian doesn't by default (you can use systemd or upstart, but sysvinit is > the default init system). Probably others, as well as *BSDs (some people > are interested in porting wayland to them). That has nothing to d

Re: Support XDG_RUNTIME_DIR being unset

2013-03-11 Thread Pekka Paalanen
On Mon, 11 Mar 2013 18:43:07 +0100 Emilio Pozuelo Monfort wrote: > On 03/11/2013 06:12 PM, Thiago Macieira wrote: > > On segunda-feira, 11 de março de 2013 17.10.53, Emilio Pozuelo Monfort > > wrote: > >> The XDG base directory specification[1] says that "If $XDG_RUNTIME_DIR > >> is not set appl

Re: [PATCH] xRandr strikes back

2013-03-11 Thread Pekka Paalanen
On Sun, 10 Mar 2013 15:53:30 +0100 Hardening wrote: > This patch adds a wlrandr extension. It is useful to test > mode switching. The patch provides the weston-switch-mode > utility that can be use quite the same way as xrandr to > change graphical modes. For now only the DRM backend supports > m

[PATCH 4/4] window: restore maximized state from fullscreen mode if necessary

2013-03-11 Thread Rafal Mielniczuk
This patch sets back maximized mode, if that was its state before going fullscreen. --- clients/window.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/clients/window.c b/clients/window.c index 3e8225f..e3e8eb5 100644 --- a/clients/window.c +++ b/clients/

[PATCH 3/4] window: save allocation only for toplevel window

2013-03-11 Thread Rafal Mielniczuk
Thanks to that we will not overwrite saved allocation, when going fullscreen from maximized state --- clients/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clients/window.c b/clients/window.c index 249ba6f..3e8225f 100644 --- a/clients/window.c +++ b/clients/windo

[PATCH 2/4] shell: reset rotation for maximized surface

2013-03-11 Thread Rafal Mielniczuk
Surface will preserve its rotation transformation when maximizing, which will cause incosistiencies (eg. no window shadows drawn) This patch removes rotation from maximized surface and restore it when unmaximizing (just like in fullscreen mode) --- src/shell.c | 31 ++-

[PATCH 1/4] shell: block move, rotate, resize in maximized state

2013-03-11 Thread Rafal Mielniczuk
To remain consisten with client side window, which blocks moving and resizing of window in maximized state, we should do so on the compositor side as well. (until there is some unmaximize notification from server, which will allow window to start drawing shadows and revert itself to toplevel state

[PATCH 0/4] improve window maximize handling

2013-03-11 Thread Rafal Mielniczuk
Hi This series of patches improves a bit handling of maximized windows in desktop shell. There were some inconsistencies like window could be moved in maximized state using mod+left button, window not reseting rotation when going maximized and a few other. I tried to address those issues, as a g

Re: Clipboard and selection in wayland.

2013-03-11 Thread Bill Spitzak
Yichao Yu wrote: I think the middle button paste function is very different from drag-and-drop. It's more like a auto-copy-clipboard. For drag-and-drop, the client that starts the dnd (therefore provide the data), should have focus but isn't(haven't been) necessarily selecting anything. While fo

Re: [PATCH libxkbcommon] keymap: add xkb_keymap_new_from_memory()

2013-03-11 Thread Bill Spitzak
Okay looking more at your patch and the output of flex, I think you can just call yy_scan_bytes. It does a copy, true, but that is exactly what your code is doing. And it does it by reusing code that is already in the flex output. And if flex is ever fixed so the two nulls are not needed, it s

Re: Support XDG_RUNTIME_DIR being unset

2013-03-11 Thread Pekka Paalanen
On Mon, 11 Mar 2013 10:12:08 -0700 Thiago Macieira wrote: > On segunda-feira, 11 de março de 2013 17.10.53, Emilio Pozuelo Monfort wrote: > > The XDG base directory specification[1] says that "If $XDG_RUNTIME_DIR > > is not set applications should fall back to a replacement directory > > with sim

Re: Clipboard and selection in wayland.

2013-03-11 Thread Yichao Yu
On Mon, Mar 11, 2013 at 1:19 PM, Bill Spitzak wrote: > I think the solution is for "middle-button paste" to be done using the drag > & drop mechanism, which is different than the selection. > > If the user selects an object and then clicks the middle mouse button, the > result should be the same a

Re: [PATCH weston 1/2] os_create_anonymous_file: support XDG_RUNTIME_DIR being unset

2013-03-11 Thread Bill Spitzak
Why not have _get_runtime_dir return a static string pointer instead? It avoids a copy in the (common) case where XDG_RUNTIME_DIR is set, and only leaks memory on exit if XDG_RUNTIME_DIR is not set. ___ wayland-devel mailing list wayland-devel@lists.fr

Re: Support XDG_RUNTIME_DIR being unset

2013-03-11 Thread Emilio Pozuelo Monfort
On 03/11/2013 06:12 PM, Thiago Macieira wrote: On segunda-feira, 11 de março de 2013 17.10.53, Emilio Pozuelo Monfort wrote: The XDG base directory specification[1] says that "If $XDG_RUNTIME_DIR is not set applications should fall back to a replacement directory with similar capabilities and pr

Re: [PATCH libxkbcommon] keymap: add xkb_keymap_new_from_memory()

2013-03-11 Thread Bill Spitzak
Oops, never mind, it looks like you have already analyzed yy_scan_byte and found it calls yy_scan_buffer internally (!!!). Oh well. David Herrmann wrote: Internally, we depend on yy_scan_{string,byte}() helpers. According to flex documentation these already copy the input string because they a

Re: [PATCH libxkbcommon] keymap: add xkb_keymap_new_from_memory()

2013-03-11 Thread Bill Spitzak
I know we got flex to work without a terminating null. A quick look at the source code reveals that we are calling this: yy_scan_bytes(buffer, length, scanner); Our code also does this: #define YY_INPUT(a,b,c) // disable read-next-buffer: unused and makes a warning I'm not sure if t

Re: Clipboard and selection in wayland.

2013-03-11 Thread Bill Spitzak
I think the solution is for "middle-button paste" to be done using the drag & drop mechanism, which is different than the selection. If the user selects an object and then clicks the middle mouse button, the result should be the same as if they instead dragged the selected object and then rele

Re: Support XDG_RUNTIME_DIR being unset

2013-03-11 Thread Thiago Macieira
On segunda-feira, 11 de março de 2013 17.10.53, Emilio Pozuelo Monfort wrote: > The XDG base directory specification[1] says that "If $XDG_RUNTIME_DIR > is not set applications should fall back to a replacement directory > with similar capabilities and print a warning message." > > Currently we abo

[PATCH wayland 4/4] cursor: use wl_get_runtime_dir()

2013-03-11 Thread Emilio Pozuelo Monfort
https://bugs.freedesktop.org/show_bug.cgi?id=62092 --- cursor/Makefile.am|3 ++- cursor/os-compatibility.c | 14 -- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cursor/Makefile.am b/cursor/Makefile.am index 61029b5..9519625 100644 --- a/cursor/Makefile.

[PATCH weston 2/2] compositor: don't abort if XDG_RUNTIME_DIR is not set

2013-03-11 Thread Emilio Pozuelo Monfort
The XDG base directory specification says that if XDG_RUNTIME_DIR is not set, one should print a warning and fall back to another directory. https://bugs.freedesktop.org/show_bug.cgi?id=62092 --- src/compositor.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/co

[PATCH weston 1/2] os_create_anonymous_file: support XDG_RUNTIME_DIR being unset

2013-03-11 Thread Emilio Pozuelo Monfort
This adds a local copy of wl_get_runtime_dir() from wayland's src/wayland-util.c https://bugs.freedesktop.org/show_bug.cgi?id=62092 --- shared/os-compatibility.c | 39 +-- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/shared/os-compatibility.

[PATCH wayland 3/4] wayland-server: use wl_get_runtime_dir()

2013-03-11 Thread Emilio Pozuelo Monfort
https://bugs.freedesktop.org/show_bug.cgi?id=62092 --- src/wayland-server.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/wayland-server.c b/src/wayland-server.c index 2f3ddc9..816cbf1 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@

[PATCH wayland 2/4] wayland-client: use wl_get_runtime_dir()

2013-03-11 Thread Emilio Pozuelo Monfort
https://bugs.freedesktop.org/show_bug.cgi?id=62092 --- src/wayland-client.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index 74e4657..ba88e5c 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -43

[PATCH wayland 1/4] Add wl_get_runtime_dir()

2013-03-11 Thread Emilio Pozuelo Monfort
This function returns the runtime directory, which is $XDG_RUNTIME_DIR if set, and ~/.cache otherwise. This follows the XDG base directory specification. https://bugs.freedesktop.org/show_bug.cgi?id=62092 --- src/wayland-private.h |3 +++ src/wayland-util.c| 27 +

Support XDG_RUNTIME_DIR being unset

2013-03-11 Thread Emilio Pozuelo Monfort
Hi, The XDG base directory specification[1] says that "If $XDG_RUNTIME_DIR is not set applications should fall back to a replacement directory with similar capabilities and print a warning message." Currently we abort if XDG_RUNTIME_DIR is not set. The following patches fall back to ~/.cache, as

[PATCH weston] weston-launch: cleanup - return failures in main with EXIT_FAILURE

2013-03-11 Thread Siddharth Heroor
Signed-off-by: Siddharth Heroor --- src/weston-launch.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/weston-launch.c b/src/weston-launch.c index bc7f8a2..528c345 100644 --- a/src/weston-launch.c +++ b/src/weston-launch.c @@ -542,7 +542,7 @@ main(int argc, ch

[PATCH libxkbcommon] keymap: add xkb_keymap_new_from_memory()

2013-03-11 Thread David Herrmann
The current API doesn't allow the caller to create keymaps from mmap()'ed files. The problem is, xkb_keymap_new_from_string() requires a terminating 0 byte. However, there is no way to guarantee that when using mmap() so a user currently has to copy the whole file just to get the terminating zero b