aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-04-07 12:08:22 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-04-07 13:14:43 -0400
commit68587276cfa2411e3f12e85e94878e27048df19b (patch)
treeb6bf4411a9beecadb6c8251883198b81e02e1009
parentmove buffered maximize/fullscreen for wl clients to occur before csd update (diff)
downloadenlightenment-68587276cfa2411e3f12e85e94878e27048df19b.tar.gz
Clean up some header inclusion
Including certain headers in the wrong order can cause problems if we're configured to use beta api (right now wayland forces this). In most cases we should just be including e.h and not the individual EFL headers anyway. This fixes some of that. fix https://phab.enlightenment.org/T3426, https://phab.enlightenment.org/T3428
-rw-r--r--src/bin/e_comp_wl.c25
-rw-r--r--src/bin/e_pixmap.c9
-rw-r--r--src/bin/e_uuid_store.c8
-rw-r--r--src/modules/bluez4/agent.h2
-rw-r--r--src/modules/packagekit/e_mod_main.c1
-rw-r--r--src/modules/packagekit/e_mod_packagekit.c4
-rw-r--r--src/modules/packagekit/e_mod_packagekit.h1
-rw-r--r--src/modules/temperature/tempget.c8
8 files changed, 30 insertions, 28 deletions
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 8547c3dc5..46b81b65c 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -754,8 +754,9 @@ _e_comp_wl_buffer_cb_destroy(struct wl_listener *listener, void *data EINA_UNUSE
E_Comp_Wl_Buffer *buffer;
buffer = container_of(listener, E_Comp_Wl_Buffer, destroy_listener);
+fprintf(stderr, "EMIT SIGNAL FOR %p\n", buffer);
wl_signal_emit(&buffer->destroy_signal, buffer);
- free(buffer);
+// free(buffer);
}
static void
@@ -981,6 +982,7 @@ _e_comp_wl_surface_state_cb_buffer_destroy(struct wl_listener *listener, void *d
state =
container_of(listener, E_Comp_Wl_Surface_State, buffer_destroy_listener);
state->buffer = NULL;
+ state->buffer_destroy_listener.notify = NULL;
}
static void
@@ -988,8 +990,9 @@ _e_comp_wl_surface_state_init(E_Comp_Wl_Surface_State *state, int w, int h)
{
state->new_attach = EINA_FALSE;
state->buffer = NULL;
- state->buffer_destroy_listener.notify =
- _e_comp_wl_surface_state_cb_buffer_destroy;
+ state->buffer_destroy_listener.notify = NULL;
+// state->buffer_destroy_listener.notify =
+// _e_comp_wl_surface_state_cb_buffer_destroy;
state->sx = state->sy = 0;
state->input = eina_tiler_new(w, h);
@@ -1023,20 +1026,27 @@ _e_comp_wl_surface_state_finish(E_Comp_Wl_Surface_State *state)
if (state->input) eina_tiler_free(state->input);
state->input = NULL;
- if (state->buffer) wl_list_remove(&state->buffer_destroy_listener.link);
+ if (state->buffer_destroy_listener.notify) wl_list_remove(&state->buffer_destroy_listener.link);
state->buffer = NULL;
+ state->buffer_destroy_listener.notify = NULL;
}
static void
_e_comp_wl_surface_state_buffer_set(E_Comp_Wl_Surface_State *state, E_Comp_Wl_Buffer *buffer)
{
if (state->buffer == buffer) return;
- if (state->buffer)
+ if (state->buffer_destroy_listener.notify) {
+fprintf(stderr, "REMOVE SIGNAL: BUFFER %p HANDLER %p\n", state->buffer, &state->buffer_destroy_listener);
wl_list_remove(&state->buffer_destroy_listener.link);
+state->buffer_destroy_listener.notify = NULL;
+}
state->buffer = buffer;
- if (state->buffer)
+ if (state->buffer) { fprintf(stderr, "STATE %p ADD SIGNAL: BUFFER %p HANDLER %p\n", state, state->buffer, &state->buffer_destroy_listener);
+ state->buffer_destroy_listener.notify =
+ _e_comp_wl_surface_state_cb_buffer_destroy;
+wl_list_init(&state->buffer_destroy_listener.link);
wl_signal_add(&state->buffer->destroy_signal,
- &state->buffer_destroy_listener);
+ &state->buffer_destroy_listener);}
}
static void
@@ -2730,6 +2740,7 @@ e_comp_wl_buffer_get(struct wl_resource *resource)
buffer->shm_buffer = shmbuff;
buffer->resource = resource;
+fprintf(stderr, "INIT SIGNAL FOR %p\n", buffer);
wl_signal_init(&buffer->destroy_signal);
buffer->destroy_listener.notify = _e_comp_wl_buffer_cb_destroy;
wl_resource_add_destroy_listener(resource, &buffer->destroy_listener);
diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c
index 2bd94a77f..908932903 100644
--- a/src/bin/e_pixmap.c
+++ b/src/bin/e_pixmap.c
@@ -64,6 +64,7 @@ _e_pixmap_cb_deferred_buffer_destroy(struct wl_listener *listener, void *data EI
E_Comp_Wl_Buffer *buffer;
buffer = container_of(listener, E_Comp_Wl_Buffer, deferred_destroy_listener);
+fprintf(stderr, "DEFERRED DESTROY: %p\n", buffer);
buffer->discarding_pixmap->free_buffers = eina_list_remove(buffer->discarding_pixmap->free_buffers, buffer);
buffer->discarding_pixmap = NULL;
}
@@ -74,6 +75,7 @@ _e_pixmap_cb_buffer_destroy(struct wl_listener *listener, void *data EINA_UNUSED
E_Pixmap *cp;
cp = container_of(listener, E_Pixmap, buffer_destroy_listener);
+fprintf(stderr, "BUFFER DESTROY: %p\n", cp->buffer);
cp->buffer = NULL;
cp->buffer_destroy_listener.notify = NULL;
}
@@ -84,6 +86,7 @@ _e_pixmap_cb_held_buffer_destroy(struct wl_listener *listener, void *data EINA_U
E_Pixmap *cp;
cp = container_of(listener, E_Pixmap, held_buffer_destroy_listener);
+fprintf(stderr, "HELD BUFFER DESTROY: %p\n", cp->held_buffer);
cp->held_buffer = NULL;
cp->held_buffer_destroy_listener.notify = NULL;
}
@@ -136,7 +139,9 @@ _e_pixmap_wayland_buffer_release(E_Pixmap *cp, E_Comp_Wl_Buffer *buffer)
if (buffer->discarding_pixmap) return;
buffer->discarding_pixmap = cp;
+if (buffer->deferred_destroy_listener.notify) fprintf(stderr, "EXPLODE\n");
buffer->deferred_destroy_listener.notify = _e_pixmap_cb_deferred_buffer_destroy;
+fprintf(stderr, "DEFERRED: BUFFER %p LISTENER %p\n", buffer, &buffer->deferred_destroy_listener);
wl_signal_add(&buffer->destroy_signal, &buffer->deferred_destroy_listener);
cp->free_buffers = eina_list_append(cp->free_buffers, buffer);
return;
@@ -177,6 +182,7 @@ _e_pixmap_wayland_image_clear(E_Pixmap *cp)
_e_pixmap_wayland_buffer_release(cp, cp->held_buffer);
if (cp->held_buffer_destroy_listener.notify)
{
+fprintf(stderr, "HELD--: BUFFER %p LISTENER %p\n", cp->held_buffer, &cp->held_buffer_destroy_listener);
wl_list_remove(&cp->held_buffer_destroy_listener.link);
cp->held_buffer_destroy_listener.notify = NULL;
}
@@ -645,12 +651,14 @@ e_pixmap_resource_set(E_Pixmap *cp, void *resource)
}
if (cp->buffer_destroy_listener.notify)
{
+fprintf(stderr, "SMOKING GUN--: BUFFER %p HANDLER %p\n", cp->buffer, &cp->buffer_destroy_listener);
wl_list_remove(&cp->buffer_destroy_listener.link);
cp->buffer_destroy_listener.notify = NULL;
}
cp->buffer = resource;
if (!cp->buffer) return;
cp->buffer_destroy_listener.notify = _e_pixmap_cb_buffer_destroy;
+fprintf(stderr, "SMOKING GUN: BUFFER %p HANDLER %p\n", cp->buffer, &cp->buffer_destroy_listener);
wl_signal_add(&cp->buffer->destroy_signal,
&cp->buffer_destroy_listener);
@@ -813,6 +821,7 @@ e_pixmap_image_refresh(E_Pixmap *cp)
cp->data = wl_shm_buffer_get_data(cp->buffer->shm_buffer);
cp->held_buffer_destroy_listener.notify = _e_pixmap_cb_held_buffer_destroy;
+fprintf(stderr, "HELD: BUFFER %p LISTENER %p\n", cp->held_buffer, &cp->held_buffer_destroy_listener);
wl_signal_add(&cp->held_buffer->destroy_signal,
&cp->held_buffer_destroy_listener);
return EINA_TRUE;
diff --git a/src/bin/e_uuid_store.c b/src/bin/e_uuid_store.c
index c21534c05..d083c3ad0 100644
--- a/src/bin/e_uuid_store.c
+++ b/src/bin/e_uuid_store.c
@@ -6,14 +6,8 @@
* 3. (optional) Write the whole blob into a file on disk for later use)
*/
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <Eina.h>
-
#include <e.h>
+#include <sys/mman.h>
/* Use anonymous mapping if we don't want a persistent file on the disk */
#define OBJECT_NAME "/e_uuid_store"
diff --git a/src/modules/bluez4/agent.h b/src/modules/bluez4/agent.h
index 6efd1e91b..daf6c5334 100644
--- a/src/modules/bluez4/agent.h
+++ b/src/modules/bluez4/agent.h
@@ -1,5 +1,3 @@
-#include "Eldbus.h"
-
#define AGENT_PATH "/org/bluez/Agent"
#define REMOTE_AGENT_PATH "/org/bluez/RemoteAgent"
diff --git a/src/modules/packagekit/e_mod_main.c b/src/modules/packagekit/e_mod_main.c
index 83a771bc0..810050ea7 100644
--- a/src/modules/packagekit/e_mod_main.c
+++ b/src/modules/packagekit/e_mod_main.c
@@ -1,5 +1,4 @@
#include <e.h>
-#include <Eldbus.h>
#include "e_mod_main.h"
#include "e_mod_config.h"
#include "e_mod_packagekit.h"
diff --git a/src/modules/packagekit/e_mod_packagekit.c b/src/modules/packagekit/e_mod_packagekit.c
index 27913604d..9440b6844 100644
--- a/src/modules/packagekit/e_mod_packagekit.c
+++ b/src/modules/packagekit/e_mod_packagekit.c
@@ -1,6 +1,4 @@
-#include <e.h>
-#include <Eldbus.h>
-#include <Efreet.h>
+#include "e.h"
#include "e_mod_main.h"
#include "e_mod_packagekit.h"
diff --git a/src/modules/packagekit/e_mod_packagekit.h b/src/modules/packagekit/e_mod_packagekit.h
index b6795b4c8..c50e0e409 100644
--- a/src/modules/packagekit/e_mod_packagekit.h
+++ b/src/modules/packagekit/e_mod_packagekit.h
@@ -1,7 +1,6 @@
#ifndef PACKAGEKIT_H
#define PACKAGEKIT_H
-#include <Eldbus.h>
#include <e.h>
diff --git a/src/modules/temperature/tempget.c b/src/modules/temperature/tempget.c
index b24eb8218..f66f0292c 100644
--- a/src/modules/temperature/tempget.c
+++ b/src/modules/temperature/tempget.c
@@ -1,7 +1,4 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <limits.h>
+#include "e.h"
#ifdef __FreeBSD__
# include <sys/types.h>
@@ -17,9 +14,6 @@
#include <err.h>
#endif
-#include <Eina.h>
-#include <Ecore.h>
-#include <Ecore_File.h>
#include "e_mod_main.h"
static int sensor_type = SENSOR_TYPE_NONE;