Commit 7ad08215 authored by Santosh Mahto's avatar Santosh Mahto
Browse files

Fixups missing xdg_wrapper changes

parent a3010fa0
......@@ -435,6 +435,6 @@ patches = [
},
{
# Collabora: Allow setting surface id.
'name': 'enable_setIVISurfaceID_api',
'name': 'setIVISurfaceID',
}
]
......@@ -14,21 +14,21 @@ index 6a6b8f8a45de..d17128dd46ce 100644
if (use_x11) {
defines += [ "USE_X11=1" ]
diff --git build/config/ui.gni build/config/ui.gni
index 547b42fb5c66..f816c051c1d8 100644
index 0eae3470e1bb..b8e698f04154 100644
--- build/config/ui.gni
+++ build/config/ui.gni
@@ -31,6 +31,9 @@ declare_args() {
# Whether we should use glib, a low level C utility library.
use_glib = is_linux
+
+ # Whether IVI integration is enabled.
+ use_ivi = false
+
}
declare_args() {
diff --git ui/ozone/platform/wayland/wayland_window.cc ui/ozone/platform/wayland/wayland_window.cc
index 98fe563504b4..cb6fb4607d40 100644
index 98fe563504b4..4c34e046db2a 100644
--- ui/ozone/platform/wayland/wayland_window.cc
+++ ui/ozone/platform/wayland/wayland_window.cc
@@ -88,7 +88,8 @@ WaylandWindow::WaylandWindow(PlatformWindowDelegate* delegate,
......@@ -41,7 +41,7 @@ index 98fe563504b4..cb6fb4607d40 100644
// Set a class property key, which allows |this| to be used for interactive
// events, e.g. move or resize.
SetWmMoveResizeHandler(this, AsWmMoveResizeHandler());
@@ -891,4 +892,13 @@ void WaylandWindow::Leave(void* data,
@@ -891,4 +892,12 @@ void WaylandWindow::Leave(void* data,
}
}
......@@ -49,8 +49,7 @@ index 98fe563504b4..cb6fb4607d40 100644
+void WaylandWindow::SetIVISurfaceID(const unsigned int id) {
+ ivi_surface_id_ = id;
+ xdg_surface_->SetAppID(ivi_surface_id_);
+ printf("IVI app id : %d\n", id);
+ // FIXME: use this to set the app_id
+ LOG(INFO) << "IVI app id : " << ivi_surface_id_;
+}
+#endif
+
......@@ -78,6 +77,108 @@ index 94c3a60c0e96..1d79aea32f3f 100644
DISALLOW_COPY_AND_ASSIGN(WaylandWindow);
};
diff --git ui/ozone/platform/wayland/xdg_surface_wrapper.h ui/ozone/platform/wayland/xdg_surface_wrapper.h
index 58bf12938b24..02f5193636d5 100644
--- ui/ozone/platform/wayland/xdg_surface_wrapper.h
+++ ui/ozone/platform/wayland/xdg_surface_wrapper.h
@@ -59,6 +59,11 @@ class XDGSurfaceWrapper {
// Sets a desired window geometry once wayland requests client to do so.
virtual void SetWindowGeometry(const gfx::Rect& bounds) = 0;
+
+#if defined(USE_IVI)
+ // Sets the ID specified by
+ virtual void SetAppID(const unsigned int ivi_surface_id) = 0;
+#endif
};
bool CheckIfWlArrayHasValue(struct wl_array* wl_array, uint32_t value);
diff --git ui/ozone/platform/wayland/xdg_surface_wrapper_v5.cc ui/ozone/platform/wayland/xdg_surface_wrapper_v5.cc
index 7f9cdf85ad25..203865b724f9 100644
--- ui/ozone/platform/wayland/xdg_surface_wrapper_v5.cc
+++ ui/ozone/platform/wayland/xdg_surface_wrapper_v5.cc
@@ -6,6 +6,7 @@
#include <xdg-shell-unstable-v5-client-protocol.h>
+#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/base/hit_test.h"
#include "ui/ozone/platform/wayland/wayland_connection.h"
@@ -79,6 +80,15 @@ void XDGSurfaceWrapperV5::SetWindowGeometry(const gfx::Rect& bounds) {
bounds.width(), bounds.height());
}
+#if defined(USE_IVI)
+void XDGSurfaceWrapperV5::SetAppID(const unsigned int ivi_surface_id) {
+ DCHECK(xdg_surface_);
+ std::string result = base::StringPrintf("%u", ivi_surface_id);
+ xdg_surface_set_app_id(xdg_surface_.get(),
+ result.c_str());
+}
+#endif
+
// static
void XDGSurfaceWrapperV5::Configure(void* data,
xdg_surface* obj,
diff --git ui/ozone/platform/wayland/xdg_surface_wrapper_v5.h ui/ozone/platform/wayland/xdg_surface_wrapper_v5.h
index 5ef0e607a4ed..cee2f30b8586 100644
--- ui/ozone/platform/wayland/xdg_surface_wrapper_v5.h
+++ ui/ozone/platform/wayland/xdg_surface_wrapper_v5.h
@@ -35,6 +35,10 @@ class XDGSurfaceWrapperV5 : public XDGSurfaceWrapper {
void SetTitle(const base::string16& title) override;
void AckConfigure() override;
void SetWindowGeometry(const gfx::Rect& bounds) override;
+#if defined(USE_IVI)
+ void SetAppID(const unsigned int ivi_surface_id) override;
+#endif
+
// xdg_surface_listener
static void Configure(void* data,
diff --git ui/ozone/platform/wayland/xdg_surface_wrapper_v6.cc ui/ozone/platform/wayland/xdg_surface_wrapper_v6.cc
index f913d208b637..f7a7f2354b8b 100644
--- ui/ozone/platform/wayland/xdg_surface_wrapper_v6.cc
+++ ui/ozone/platform/wayland/xdg_surface_wrapper_v6.cc
@@ -6,6 +6,7 @@
#include <xdg-shell-unstable-v6-client-protocol.h>
+#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "ui/base/hit_test.h"
#include "ui/ozone/platform/wayland/wayland_connection.h"
@@ -147,6 +148,16 @@ void XDGSurfaceWrapperV6::ConfigureTopLevel(
is_fullscreen, is_activated);
}
+#if defined(USE_IVI)
+void XDGSurfaceWrapperV6::SetAppID(const unsigned int ivi_surface_id) {
+ DCHECK(zxdg_toplevel_v6_);
+ std::string result = base::StringPrintf("%u", ivi_surface_id);
+ zxdg_toplevel_v6_set_app_id(zxdg_toplevel_v6_.get(),
+ result.c_str());
+}
+#endif
+
+
// static
void XDGSurfaceWrapperV6::CloseTopLevel(
void* data,
diff --git ui/ozone/platform/wayland/xdg_surface_wrapper_v6.h ui/ozone/platform/wayland/xdg_surface_wrapper_v6.h
index 92443cce94ce..ae15dbb91dff 100644
--- ui/ozone/platform/wayland/xdg_surface_wrapper_v6.h
+++ ui/ozone/platform/wayland/xdg_surface_wrapper_v6.h
@@ -36,6 +36,9 @@ class XDGSurfaceWrapperV6 : public XDGSurfaceWrapper {
void SetTitle(const base::string16& title) override;
void AckConfigure() override;
void SetWindowGeometry(const gfx::Rect& bounds) override;
+#if defined(USE_IVI)
+ void SetAppID(const unsigned int ivi_surface_id) override;
+#endif
// xdg_surface_listener
static void Configure(void* data,
diff --git ui/platform_window/platform_window.h ui/platform_window/platform_window.h
index c7611eee8afd..0b0cb88c1dc1 100644
--- ui/platform_window/platform_window.h
......@@ -200,10 +301,10 @@ index e594c698c4f5..9930c6ff5493 100644
// Overridden from NativeWidget:
internal::NativeWidgetPrivate* AsNativeWidgetPrivate() override;
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 30cd8d62f5ee..f3ef26dbdd62 100644
index 21cabfd06228..c6c9acee3ff0 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -367,6 +367,11 @@ void Widget::ShowEmojiPanel() {
@@ -373,6 +373,11 @@ void Widget::ShowEmojiPanel() {
native_widget_->ShowEmojiPanel();
}
......@@ -216,10 +317,10 @@ index 30cd8d62f5ee..f3ef26dbdd62 100644
gfx::NativeView Widget::GetNativeView() const {
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index 6f1f45fed1b3..0212eba41a3a 100644
index 063e4c8ac778..8194d35262e4 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -811,6 +811,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -812,6 +812,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// Returns the internal name for this Widget and NativeWidget.
std::string GetName() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment