summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-02-01 18:35:15 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2014-02-18 19:20:17 -0500
commit63a9c336f3a07441d36dfe3e4cb60788a073aac3 (patch)
tree8aaac4b51fb9ac47a4f062cd1c9bc40696f9ee40
parent63a1410348c4ecfbb794e85bbe7e59c4bc816340 (diff)
Reorder the xdg_shell implementations to fit the spec'd order
-rw-r--r--clients/window.c24
-rw-r--r--desktop-shell/shell.c32
2 files changed, 28 insertions, 28 deletions
diff --git a/clients/window.c b/clients/window.c
index 9e36f206..3ea50278 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -3837,45 +3837,45 @@ handle_surface_configure(void *data, struct xdg_surface *xdg_surface,
}
static void
-handle_surface_focused_set(void *data, struct xdg_surface *xdg_surface)
+handle_surface_request_set_maximized(void *data, struct xdg_surface *xdg_surface)
{
struct window *window = data;
- window->focused = 1;
+ window_set_maximized(window, 1);
}
static void
-handle_surface_focused_unset(void *data, struct xdg_surface *xdg_surface)
+handle_surface_request_unset_maximized(void *data, struct xdg_surface *xdg_surface)
{
struct window *window = data;
- window->focused = 0;
+ window_set_maximized(window, 0);
}
static void
-handle_surface_request_set_maximized(void *data, struct xdg_surface *xdg_surface)
+handle_surface_request_set_fullscreen(void *data, struct xdg_surface *xdg_surface)
{
struct window *window = data;
- window_set_maximized(window, 1);
+ window_set_fullscreen(window, 1);
}
static void
-handle_surface_request_unset_maximized(void *data, struct xdg_surface *xdg_surface)
+handle_surface_request_unset_fullscreen(void *data, struct xdg_surface *xdg_surface)
{
struct window *window = data;
- window_set_maximized(window, 0);
+ window_set_fullscreen(window, 0);
}
static void
-handle_surface_request_set_fullscreen(void *data, struct xdg_surface *xdg_surface)
+handle_surface_focused_set(void *data, struct xdg_surface *xdg_surface)
{
struct window *window = data;
- window_set_fullscreen(window, 1);
+ window->focused = 1;
}
static void
-handle_surface_request_unset_fullscreen(void *data, struct xdg_surface *xdg_surface)
+handle_surface_focused_unset(void *data, struct xdg_surface *xdg_surface)
{
struct window *window = data;
- window_set_fullscreen(window, 0);
+ window->focused = 0;
}
static void
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index e8abeb59..dcf2520a 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -1979,22 +1979,6 @@ create_keyboard_focus_listener(struct weston_seat *seat)
wl_signal_add(&seat->keyboard->focus_signal, listener);
}
-static void
-xdg_surface_set_transient_for(struct wl_client *client,
- struct wl_resource *resource,
- struct wl_resource *parent_resource)
-{
- struct shell_surface *shsurf = wl_resource_get_user_data(resource);
- struct weston_surface *parent;
-
- if (parent_resource)
- parent = wl_resource_get_user_data(parent_resource);
- else
- parent = NULL;
-
- shell_surface_set_parent(shsurf, parent);
-}
-
static struct shell_client *
get_shell_client(struct wl_client *client)
{
@@ -3180,6 +3164,22 @@ xdg_surface_destroy(struct wl_client *client,
}
static void
+xdg_surface_set_transient_for(struct wl_client *client,
+ struct wl_resource *resource,
+ struct wl_resource *parent_resource)
+{
+ struct shell_surface *shsurf = wl_resource_get_user_data(resource);
+ struct weston_surface *parent;
+
+ if (parent_resource)
+ parent = wl_resource_get_user_data(parent_resource);
+ else
+ parent = NULL;
+
+ shell_surface_set_parent(shsurf, parent);
+}
+
+static void
xdg_surface_set_margin(struct wl_client *client,
struct wl_resource *resource,
int32_t left,