Code Review
/
staging
/
windowmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
wayland: cast wl_fixed_to_double() return to float for our interface
[staging/windowmanager.git]
/
src
/
wayland.cpp
diff --git
a/src/wayland.cpp
b/src/wayland.cpp
index
2bae9e8
..
1078a14
100644
(file)
--- a/
src/wayland.cpp
+++ b/
src/wayland.cpp
@@
-15,14
+15,18
@@
namespace wl {
// \__,_|_|___/ .__/|_|\__,_|\__, |
// |_| |___/
display::display()
// \__,_|_|___/ .__/|_|\__,_|\__, |
// |_| |___/
display::display()
- : d(std::unique_ptr<struct wl_display,
- std::function<void(struct wl_display *)>>(
+ : d(std::unique_ptr<struct wl_display, void (*)(struct wl_display *)>(
wl_display_connect(NULL),
wl_display_connect(NULL),
+#ifdef DEBUG_OUTPUT
[](struct wl_display *d) {
logdebug("wl::display ~display @ %p", d);
wl_display_disconnect(d);
})),
[](struct wl_display *d) {
logdebug("wl::display ~display @ %p", d);
wl_display_disconnect(d);
})),
- r(d.get()) {}
+#else
+ &wl_display_disconnect)),
+#endif
+ r(d.get()) {
+}
display::~display() {}
display::~display() {}
@@
-263,7
+267,8
@@
void layer_opacity(void *data,
struct ivi_controller_layer *ivi_controller_layer,
wl_fixed_t opacity) {
static_cast<struct layer *>(data)->parent->layer_opacity(
struct ivi_controller_layer *ivi_controller_layer,
wl_fixed_t opacity) {
static_cast<struct layer *>(data)->parent->layer_opacity(
- static_cast<struct layer *>(data)->id, wl_fixed_to_double(opacity));
+ static_cast<struct layer *>(data)->id,
+ float(wl_fixed_to_double(opacity)));
}
void layer_source_rectangle(void *data,
}
void layer_source_rectangle(void *data,
@@
-398,7
+403,8
@@
void surface_opacity(void *data,
struct ivi_controller_surface *ivi_controller_surface,
wl_fixed_t opacity) {
static_cast<struct surface *>(data)->parent->surface_opacity(
struct ivi_controller_surface *ivi_controller_surface,
wl_fixed_t opacity) {
static_cast<struct surface *>(data)->parent->surface_opacity(
- static_cast<struct surface *>(data)->id, wl_fixed_to_double(opacity));
+ static_cast<struct surface *>(data)->id,
+ float(wl_fixed_to_double(opacity)));
}
void surface_source_rectangle(
}
void surface_source_rectangle(