[PATCH 1/3] text: Remove surface arg in create_text_model
Jan Arne Petersen
jpetersen at openismus.com
Tue Aug 14 14:34:42 PDT 2012
From: Jan Arne Petersen <jpetersen at openismus.com>
Remove the wl_surface argument from create_text_model request. The
wl_surface is specified as an argument in the activate request instead.
---
clients/editor.c | 5 +----
protocol/text.xml | 1 -
src/text-backend.c | 3 +--
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/clients/editor.c b/clients/editor.c
index a5347fe..3453de0 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -146,17 +146,14 @@ static struct text_entry*
text_entry_create(struct editor *editor, const char *text)
{
struct text_entry *entry;
- struct wl_surface *surface;
entry = malloc(sizeof *entry);
- surface = window_get_wl_surface(editor->window);
-
entry->widget = editor->widget;
entry->window = editor->window;
entry->text = strdup(text);
entry->active = 0;
- entry->model = text_model_factory_create_text_model(editor->text_model_factory, surface);
+ entry->model = text_model_factory_create_text_model(editor->text_model_factory);
text_model_add_listener(entry->model, &text_model_listener, entry);
return entry;
diff --git a/protocol/text.xml b/protocol/text.xml
index e73cacb..2077bb2 100644
--- a/protocol/text.xml
+++ b/protocol/text.xml
@@ -46,7 +46,6 @@
<interface name="text_model_factory" version="1">
<request name="create_text_model">
<arg name="id" type="new_id" interface="text_model"/>
- <arg name="surface" type="object" interface="wl_surface"/>
</request>
</interface>
diff --git a/src/text-backend.c b/src/text-backend.c
index ddeec20..af5d0f1 100644
--- a/src/text-backend.c
+++ b/src/text-backend.c
@@ -181,8 +181,7 @@ static const struct text_model_interface text_model_implementation = {
static void text_model_factory_create_text_model(struct wl_client *client,
struct wl_resource *resource,
- uint32_t id,
- struct wl_resource *surface)
+ uint32_t id)
{
struct input_method *input_method = resource->data;
struct text_model *text_model;
--
1.7.11.4
More information about the wayland-devel
mailing list