зеркало из https://github.com/mozilla/gecko-dev.git
Comment out X11-specific code to enable Qt Embedded builds
This commit is contained in:
Родитель
465c78866e
Коммит
a048f9d8cc
|
@ -4776,7 +4776,7 @@ dnl = QT support
|
|||
dnl ========================================================
|
||||
if test "$MOZ_ENABLE_QT"
|
||||
then
|
||||
PKG_CHECK_MODULES(MOZ_QT, QtGui QtNetwork QtScript QtTest QtAssistantClient QtXml QtUiTools QtCore QtSvg)
|
||||
PKG_CHECK_MODULES(MOZ_QT, QtGui QtNetwork QtUiTools QtCore)
|
||||
AC_SUBST(MOZ_QT_CFLAGS)
|
||||
AC_SUBST(MOZ_QT_LIBS)
|
||||
|
||||
|
|
|
@ -37,13 +37,15 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include <QX11Info>
|
||||
|
||||
#include "nsIdleServiceQt.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsDebug.h"
|
||||
#include "prlink.h"
|
||||
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
#include <QX11Info>
|
||||
|
||||
typedef PRBool (*_XScreenSaverQueryExtension_fn)(Display* dpy, int* event_base,
|
||||
int* error_base);
|
||||
|
||||
|
@ -132,3 +134,27 @@ nsIdleServiceQt::GetIdleTime(PRUint32 *aTimeDiff)
|
|||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsIdleServiceQt, nsIIdleService)
|
||||
|
||||
nsIdleServiceQt::nsIdleServiceQt()
|
||||
{
|
||||
}
|
||||
|
||||
static void Initialize()
|
||||
{
|
||||
}
|
||||
|
||||
nsIdleServiceQt::~nsIdleServiceQt()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIdleServiceQt::GetIdleTime(PRUint32 *aTimeDiff)
|
||||
{
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -160,10 +160,12 @@ static const nsModuleComponentInfo components[] =
|
|||
NS_BIDIKEYBOARD_CID,
|
||||
"@mozilla.org/widget/bidikeyboard;1",
|
||||
nsBidiKeyboardConstructor },
|
||||
#ifdef Q_WS_X11
|
||||
{ "Qt Idle Service",
|
||||
NS_IDLE_SERVICE_CID,
|
||||
"@mozilla.org/widget/idleservice;1",
|
||||
nsIdleServiceQtConstructor },
|
||||
#endif
|
||||
{ "Qt Sound",
|
||||
NS_SOUND_CID,
|
||||
"@mozilla.org/sound;1",
|
||||
|
|
|
@ -59,7 +59,9 @@
|
|||
|
||||
#include "nsQtKeyUtils.h"
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
#include <X11/XF86keysym.h>
|
||||
#endif
|
||||
|
||||
#include "nsWidgetAtoms.h"
|
||||
|
||||
|
@ -97,12 +99,15 @@
|
|||
#include <qapplication.h>
|
||||
#include <qdesktopwidget.h>
|
||||
#include <qwidget.h>
|
||||
#include "qx11info_x11.h"
|
||||
#include <qcursor.h>
|
||||
#include <qobject.h>
|
||||
#include <execinfo.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
#include "qx11info_x11.h"
|
||||
#endif
|
||||
|
||||
#include <execinfo.h>
|
||||
|
||||
#include "mozqwidget.h"
|
||||
|
@ -821,9 +826,11 @@ nsWindow::GetNativeData(PRUint32 aDataType)
|
|||
return SetupPluginPort();
|
||||
break;
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
case NS_NATIVE_DISPLAY:
|
||||
return mDrawingarea->x11Info().display();
|
||||
break;
|
||||
#endif
|
||||
|
||||
case NS_NATIVE_GRAPHIC: {
|
||||
NS_ASSERTION(nsnull != mToolkit, "NULL toolkit, unable to get a GC");
|
||||
|
@ -1042,12 +1049,7 @@ static int gDoubleBuffering = -1;
|
|||
nsEventStatus
|
||||
nsWindow::OnExposeEvent(QPaintEvent *aEvent)
|
||||
{
|
||||
if (gDoubleBuffering == -1) {
|
||||
if (getenv("MOZ_NO_DOUBLEBUFFER"))
|
||||
gDoubleBuffering = 0;
|
||||
else
|
||||
gDoubleBuffering = 1;
|
||||
}
|
||||
//fprintf (stderr, "===== Expose start\n");
|
||||
|
||||
if (mIsDestroyed) {
|
||||
LOG(("Expose event on destroyed window [%p] window %p\n",
|
||||
|
@ -1229,6 +1231,8 @@ nsWindow::OnExposeEvent(QPaintEvent *aEvent)
|
|||
ctx = nsnull;
|
||||
targetSurface = nsnull;
|
||||
|
||||
//fprintf (stderr, "===== Expose end\n");
|
||||
|
||||
// check the return value!
|
||||
return status;
|
||||
}
|
||||
|
@ -1874,6 +1878,7 @@ nsWindow::SetWindowClass(const nsAString &xulWinType)
|
|||
nsXPIDLString brandName;
|
||||
GetBrandName(brandName);
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
XClassHint *class_hint = XAllocClassHint();
|
||||
if (!class_hint)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
@ -1915,6 +1920,8 @@ nsWindow::SetWindowClass(const nsAString &xulWinType)
|
|||
nsMemory::Free(class_hint->res_class);
|
||||
nsMemory::Free(class_hint->res_name);
|
||||
XFree(class_hint);
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2391,7 +2398,9 @@ nsWindow::HideWindowChrome(PRBool aShouldHide)
|
|||
// and flush the queue here so that we don't end up with a BadWindow
|
||||
// error later when this happens (when the persistence timer fires
|
||||
// and GetWindowPos is called)
|
||||
#ifdef Q_WS_X11
|
||||
XSync(mDrawingarea->x11Info().display(), False);
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -2589,6 +2598,13 @@ nsWindow::createQWidget(QWidget *parent, nsWidgetInitData *aInitData)
|
|||
Qt::WFlags flags = Qt::Widget;
|
||||
const char *windowName = NULL;
|
||||
|
||||
if (gDoubleBuffering == -1) {
|
||||
if (getenv("MOZ_NO_DOUBLEBUFFER"))
|
||||
gDoubleBuffering = 0;
|
||||
else
|
||||
gDoubleBuffering = 1;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_WIDGETS
|
||||
qDebug("NEW WIDGET\n\tparent is %p (%s)", (void*)parent,
|
||||
parent ? qPrintable(parent->objectName()) : "null");
|
||||
|
|
Загрузка…
Ссылка в новой задаче