commit c261063

Michael Forney  ·  2014-12-06 20:33:37 +0000 UTC
parent bf9ee7c
Various minor fixes/style changes
13 files changed,  +15, -19
+5, -7
 1@@ -521,13 +521,12 @@ void compositor_view_show(struct compositor_view * view)
 2     if (view->visible)
 3         return;
 4 
 5-    /* Assume worst-case no clipping until we draw the next frame (in case the
 6-     * surface gets moved before that. */
 7-    pixman_region32_clear(&view->clip);
 8-
 9     view->visible = true;
10     view_update_screens(&view->base);
11 
12+    /* Assume worst-case no clipping until we draw the next frame (in case the
13+     * surface gets moved before that. */
14+    pixman_region32_clear(&view->clip);
15     damage_view(view);
16     update(&view->base);
17 
18@@ -831,16 +830,15 @@ static struct wl_compositor_interface compositor_implementation = {
19 static void bind_compositor(struct wl_client * client, void * data,
20                             uint32_t version, uint32_t id)
21 {
22-    struct swc_compositor * compositor = data;
23     struct wl_resource * resource;
24 
25-    if (version >= 3)
26+    if (version > 3)
27         version = 3;
28 
29     resource = wl_resource_create(client, &wl_compositor_interface,
30                                   version, id);
31     wl_resource_set_implementation(resource, &compositor_implementation,
32-                                   compositor, NULL);
33+                                   NULL, NULL);
34 }
35 
36 bool swc_compositor_initialize()
+1, -1
1@@ -63,7 +63,7 @@ static void bind_data_device_manager(struct wl_client * client, void * data,
2 {
3     struct wl_resource * resource;
4 
5-    if (version >= 1)
6+    if (version > 1)
7         version = 1;
8 
9     resource = wl_resource_create(client, &wl_data_device_manager_interface,
+1, -1
1@@ -266,7 +266,7 @@ static void bind_drm(struct wl_client * client, void * data, uint32_t version,
2 {
3     struct wl_resource * resource;
4 
5-    if (version >= 2)
6+    if (version > 2)
7         version = 2;
8 
9     resource = wl_resource_create(client, &wl_drm_interface, version, id);
+1, -0
1@@ -29,6 +29,7 @@
2 #include "compositor.h"
3 #include "internal.h"
4 #include "keyboard.h"
5+#include "surface.h"
6 #include "util.h"
7 
8 #include <assert.h>
+0, -1
1@@ -25,7 +25,6 @@
2 #define SWC_KEYBOARD_H
3 
4 #include "input.h"
5-#include "surface.h"
6 #include "xkb.h"
7 
8 #include <wayland-util.h>
+1, -1
1@@ -20,7 +20,7 @@ static void bind_output(struct wl_client * client, void * data,
2     struct wl_resource * resource;
3     uint32_t flags;
4 
5-    if (version >= 2)
6+    if (version > 2)
7         version = 2;
8 
9     resource = wl_resource_create(client, &wl_output_interface, version, id);
+1, -1
1@@ -52,7 +52,7 @@ static void bind_panel_manager(struct wl_client * client, void * data,
2 {
3     struct wl_resource * resource;
4 
5-    if (version >= 1)
6+    if (version > 1)
7         version = 1;
8 
9     resource = wl_resource_create(client, &swc_panel_manager_interface,
+1, -1
1@@ -84,7 +84,7 @@ static void bind_screen(struct wl_client * client, void * data,
2     struct screen * screen = data;
3     struct wl_resource * resource;
4 
5-    if (version >= 1)
6+    if (version > 1)
7         version = 1;
8 
9     resource = wl_resource_create(client, &swc_screen_interface, version, id);
+1, -1
1@@ -206,7 +206,7 @@ static void bind_seat(struct wl_client * client, void * data, uint32_t version,
2 {
3     struct wl_resource * resource;
4 
5-    if (version >= 4)
6+    if (version > 4)
7         version = 4;
8 
9     resource = wl_resource_create(client, &wl_seat_interface, version, id);
+1, -1
1@@ -55,7 +55,7 @@ static void bind_shell(struct wl_client * client, void * data,
2 {
3     struct wl_resource * resource;
4 
5-    if (version >= 1)
6+    if (version > 1)
7         version = 1;
8 
9     resource = wl_resource_create(client, &wl_shell_interface, version, id);
+1, -1
1@@ -227,7 +227,7 @@ static void bind_shm(struct wl_client * client, void * data, uint32_t version,
2 {
3     struct wl_resource * resource;
4 
5-    if (version >= 1)
6+    if (version > 1)
7         version = 1;
8 
9     resource = wl_resource_create(client, &wl_shm_interface, version, id);
+0, -2
1@@ -80,8 +80,6 @@ static void state_finalize(struct swc_surface_state * state)
2 /**
3  * In order to set the buffer of a surface state (current or pending), we need
4  * to manage the destroy listeners we have for the new and old buffer.
5- *
6- * @return: Whether or not the buffer was changed.
7  */
8 static void state_set_buffer(struct swc_surface_state * state,
9                              struct wl_resource * resource)
+1, -1
1@@ -121,7 +121,7 @@ static void bind_shell(struct wl_client * client, void * data,
2 {
3     struct wl_resource * resource;
4 
5-    if (version >= 1)
6+    if (version > 1)
7         version = 1;
8 
9     resource = wl_resource_create(client, &xdg_shell_interface, version, id);