Skip to content

Commit

Permalink
Remove not used code (flutter-tizen#18)
Browse files Browse the repository at this point in the history
* Remove not used code

- Remove visibility change callback which is not used in text input
- Remove not used parameter from RegisterIMFcallback

* Extemal_texture_gl does not rely on tbm_bo.h
  • Loading branch information
xiaowei-guan authored Dec 27, 2020
1 parent 167ac22 commit dad9f69
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
4 changes: 2 additions & 2 deletions shell/platform/tizen/channels/text_input_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ TextInputChannel::TextInputChannel(flutter::BinaryMessenger* messenger,
engine_->tizen_native_window->GetWindowHandle();
ecore_imf_context_client_window_set(
imfContext_, (void*)ecore_wl2_window_id_get(ecoreWindow));
RegisterIMFCallback(ecoreWindow);
RegisterIMFCallback();
} else {
LoggerE("Failed to create imfContext");
}
Expand Down Expand Up @@ -636,7 +636,7 @@ void TextInputChannel::HideSoftwareKeyboard() {
}
}

void TextInputChannel::RegisterIMFCallback(Ecore_Wl2_Window* ecoreWindow) {
void TextInputChannel::RegisterIMFCallback() {
// ecore_imf_context_input_panel_enabled_set(imfContext_, false);
ecore_imf_context_event_callback_add(imfContext_, ECORE_IMF_CALLBACK_COMMIT,
CommitCallback, this);
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/tizen/channels/text_input_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class TextInputChannel {
void NonIMFFallback(Ecore_Event_Key* keyDownEvent);
void EnterPressed(flutter::TextInputModel* model);
void SelectPressed(flutter::TextInputModel* model);
void RegisterIMFCallback(Ecore_Wl2_Window* ecoreWindow);
void RegisterIMFCallback();
void UnregisterIMFCallback();

std::unique_ptr<flutter::MethodChannel<rapidjson::Document>> channel_;
Expand Down
1 change: 0 additions & 1 deletion shell/platform/tizen/external_texture_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define FLUTTER_SHELL_PLATFORM_TIZEN_EXTERNAL_TEXTURE_GL_H_

#include <stdint.h>
#include <tbm_bo.h>
#include <tbm_bufmgr.h>
#include <tbm_drm_helper.h>
#include <tbm_surface.h>
Expand Down
7 changes: 0 additions & 7 deletions shell/platform/tizen/touch_event_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ TouchEventHandler::TouchEventHandler(TizenEmbedderEngine *engine)
ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, OnTouch, this));
touch_event_handlers_.push_back(
ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, OnTouch, this));
touch_event_handlers_.push_back(ecore_event_handler_add(
ECORE_WL2_EVENT_WINDOW_VISIBILITY_CHANGE, OnTouch, this));
}

TouchEventHandler::~TouchEventHandler() {
Expand Down Expand Up @@ -89,11 +87,6 @@ Eina_Bool TouchEventHandler::OnTouch(void *data, int type, void *event) {
self->SendFlutterPointerEvent(kMove, move_event->x, move_event->y, 0, 0,
move_event->timestamp);
}
} else if (type == ECORE_WL2_EVENT_WINDOW_VISIBILITY_CHANGE) {
auto *focus_event =
reinterpret_cast<Ecore_Wl2_Event_Window_Visibility_Change *>(event);
LoggerD("Visibility changed: %u, %d", focus_event->win,
focus_event->fully_obscured);
} else if (type == ECORE_EVENT_MOUSE_WHEEL) {
auto *wheel_event = reinterpret_cast<Ecore_Event_Mouse_Wheel *>(event);
double scroll_delta_x = 0.0, scroll_delta_y = 0.0;
Expand Down
3 changes: 0 additions & 3 deletions shell/platform/tizen/touch_event_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
#ifndef EMBEDDER_TOUCH_EVENT_HANDLER_H_
#define EMBEDDER_TOUCH_EVENT_HANDLER_H_

#define EFL_BETA_API_SUPPORT
#include <Ecore_Input.h>
#include <Ecore_Wl2.h>

#include <vector>

#include "flutter/shell/platform/embedder/embedder.h"
Expand Down

0 comments on commit dad9f69

Please sign in to comment.