Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Squashed 'maliit-framework/' changes from 17fdf86..314f18e
314f18e Merge pull request #11 from pvuorela/reshow
b8cae10 Reshow virtual keyboard when hardware keyboard disappears
835778c Fix wayland build for Qt 5.4 and newer
ee6a1e2 Merge pull request #10 from Elleo/fix-qt55
a3ff493 Fix building against Qt 5.5
d639d12 Merge pull request #8 from sandsmark/master
4a76d76 stop passing non-existing arguments to the maliit server from example app
5ea759a Merge pull request #7 from sandsmark/master
acb25bd Fix build with Qt 5.3
a185b29 Merge pull request #6 from pvuorela/small_fixes
2131ccc Don't override the default surface format, extend it instead.
a98ec41 Make sure content orientation is correct after focus window has changed
0a171c6 Disconnect from peer

git-subtree-dir: maliit-framework
git-subtree-split: 314f18e2ae08a0eef2ea6bb20ef5e144e9ec17c4
  • Loading branch information
pvuorela committed Jul 21, 2015
1 parent f5a388c commit 873b9a9
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 15 deletions.
1 change: 1 addition & 0 deletions connection/dbusinputcontextconnection.cpp
Expand Up @@ -94,6 +94,7 @@ DBusInputContextConnection::onDisconnection()
mConnections.remove(connectionNumber);
delete proxy;
handleDisconnection(connectionNumber);
QDBusConnection::disconnectFromPeer(name);
}

void
Expand Down
4 changes: 4 additions & 0 deletions 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 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
1 change: 1 addition & 0 deletions input-context/minputcontext.cpp
Expand Up @@ -281,6 +281,7 @@ void MInputContext::setFocusObject(QObject *focused)
if (window) {
connect(window.data(), SIGNAL(contentOrientationChanged(Qt::ScreenOrientation)),
this, SLOT(updateServerOrientation(Qt::ScreenOrientation)));
updateServerOrientation(window->contentOrientation());
}
}

Expand Down
5 changes: 5 additions & 0 deletions passthroughserver/main.cpp
Expand Up @@ -67,6 +67,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 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 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
2 changes: 1 addition & 1 deletion src/quick/inputmethodquick.cpp
Expand Up @@ -41,7 +41,7 @@ QQuickView *createWindow(MAbstractInputMethodHost *host)
{
QScopedPointer<QQuickView> view(new QQuickView);

QSurfaceFormat format;
QSurfaceFormat format = view->requestedFormat();
format.setAlphaBufferSize(8);
view->setFormat(format);
view->setColor(QColor(Qt::transparent));
Expand Down
4 changes: 4 additions & 0 deletions 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 873b9a9

Please sign in to comment.