Skip to content

Commit

Permalink
Merge commit '873b9a9825ff02c81a3e80e0fd6687c5bccfceed'
Browse files Browse the repository at this point in the history
  • Loading branch information
pvuorela committed Jul 21, 2015
2 parents 807b9b0 + 873b9a9 commit 58832eb
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 14 deletions.
4 changes: 4 additions & 0 deletions maliit-framework/connection/waylandinputmethodconnection.cpp
Expand Up @@ -465,7 +465,11 @@ namespace Maliit {
namespace Wayland {

InputMethod::InputMethod(MInputContextConnection *connection, struct wl_registry *registry, int id)
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
: QtWayland::wl_input_method(registry, id, 1)
#else
: QtWayland::wl_input_method(registry, id)
#endif
, m_connection(connection)
, m_context()
{
Expand Down
11 changes: 1 addition & 10 deletions maliit-framework/examples/apps/plainqt/mainwindow.cpp
Expand Up @@ -173,19 +173,10 @@ bool MainWindow::eventFilter(QObject *watched,

void MainWindow::onStartServerClicked()
{

QStringList arguments;
arguments << "-bypass-wm-hint";

// Self-compositing is currently only supported in fullscreen mode:
if (enableFullScreenMode()) {
arguments << "-use-self-composition";
}

if (m_server_process->state() != QProcess::NotRunning) {
m_server_process->terminate();
} else {
m_server_process->start(serverName, arguments);
m_server_process->start(serverName, QStringList());
}
}

Expand Down
5 changes: 5 additions & 0 deletions maliit-framework/passthroughserver/main.cpp
Expand Up @@ -70,6 +70,11 @@ void outputMessagesToStdErr(QtMsgType type,
fprintf(stderr, "DEBUG: %s\n", raw);
}
break;
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
case QtInfoMsg:
fprintf(stderr, "INFO: %s\n", raw);
break;
#endif
case QtWarningMsg:
fprintf(stderr, "WARNING: %s\n", raw);
break;
Expand Down
4 changes: 2 additions & 2 deletions maliit-framework/src/maliit/plugins/updateevent.cpp
Expand Up @@ -39,7 +39,7 @@ bool MImUpdateEventPrivate::isFlagSet(Qt::InputMethodHint hint,

if (update.contains(Maliit::Internal::inputMethodHints)) {
const Qt::InputMethodHints hints(static_cast<Qt::InputMethodHints>(
update.value(Maliit::Internal::inputMethodHints).toLongLong()));
update.value(Maliit::Internal::inputMethodHints).toInt()));

result = (hints & hint);
}
Expand Down Expand Up @@ -90,7 +90,7 @@ Qt::InputMethodHints MImUpdateEvent::hints(bool *changed) const
{
Q_D(const MImUpdateEvent);
return static_cast<Qt::InputMethodHints>(
d->extractProperty(Maliit::Internal::inputMethodHints, changed).toLongLong());
d->extractProperty(Maliit::Internal::inputMethodHints, changed).toInt());
}

bool MImUpdateEvent::westernNumericInputEnforced(bool *changed) const
Expand Down
9 changes: 7 additions & 2 deletions maliit-framework/src/mimpluginmanager.cpp
Expand Up @@ -343,7 +343,12 @@ void MIMPluginManagerPrivate::setActiveHandlers(const QSet<Maliit::HandlerState>

// notify plugins about new states
Q_FOREACH (Maliit::Plugins::InputMethodPlugin *plugin, activatedPlugins) {
plugins.value(plugin).inputMethod->setState(plugins.value(plugin).state);
PluginDescription desc = plugins.value(plugin);
desc.inputMethod->setState(desc.state);
if (visible) {
desc.windowGroup->activate();
desc.inputMethod->show();
}
}

// deactivate unnecessary plugins
Expand Down Expand Up @@ -1493,7 +1498,7 @@ void MIMPluginManager::handleWidgetStateChanged(unsigned int clientId,
}
}

const Qt::InputMethodHints lastHints = static_cast<Qt::InputMethodHints>(newState.value(Maliit::Internal::inputMethodHints).toLongLong());
const Qt::InputMethodHints lastHints = static_cast<Qt::InputMethodHints>(newState.value(Maliit::Internal::inputMethodHints).toInt());
MImUpdateEvent ev(newState, changedProperties, lastHints);

// general notification last
Expand Down
4 changes: 4 additions & 0 deletions maliit-framework/src/waylandplatform.cpp
Expand Up @@ -126,7 +126,11 @@ void WaylandPlatformPrivate::handleRegistryGlobal(uint32_t name,

qDebug() << __PRETTY_FUNCTION__ << "Name:" << name << "Interface:" << interface;
if (!strcmp(interface, "wl_input_panel")) {
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
m_panel.reset(new QtWayland::wl_input_panel(m_registry, name, 1));
#else
m_panel.reset(new QtWayland::wl_input_panel(m_registry, name));
#endif
m_panel_name = name;

Q_FOREACH (const WindowData& data, m_scheduled_windows) {
Expand Down

0 comments on commit 58832eb

Please sign in to comment.