зеркало из 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 ========================================================
|
dnl ========================================================
|
||||||
if test "$MOZ_ENABLE_QT"
|
if test "$MOZ_ENABLE_QT"
|
||||||
then
|
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_CFLAGS)
|
||||||
AC_SUBST(MOZ_QT_LIBS)
|
AC_SUBST(MOZ_QT_LIBS)
|
||||||
|
|
||||||
|
|
|
@ -37,13 +37,15 @@
|
||||||
*
|
*
|
||||||
* ***** END LICENSE BLOCK ***** */
|
* ***** END LICENSE BLOCK ***** */
|
||||||
|
|
||||||
#include <QX11Info>
|
|
||||||
|
|
||||||
#include "nsIdleServiceQt.h"
|
#include "nsIdleServiceQt.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
#include "nsDebug.h"
|
#include "nsDebug.h"
|
||||||
#include "prlink.h"
|
#include "prlink.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef Q_WS_X11
|
||||||
|
#include <QX11Info>
|
||||||
|
|
||||||
typedef PRBool (*_XScreenSaverQueryExtension_fn)(Display* dpy, int* event_base,
|
typedef PRBool (*_XScreenSaverQueryExtension_fn)(Display* dpy, int* event_base,
|
||||||
int* error_base);
|
int* error_base);
|
||||||
|
|
||||||
|
@ -132,3 +134,27 @@ nsIdleServiceQt::GetIdleTime(PRUint32 *aTimeDiff)
|
||||||
|
|
||||||
return NS_ERROR_FAILURE;
|
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,
|
NS_BIDIKEYBOARD_CID,
|
||||||
"@mozilla.org/widget/bidikeyboard;1",
|
"@mozilla.org/widget/bidikeyboard;1",
|
||||||
nsBidiKeyboardConstructor },
|
nsBidiKeyboardConstructor },
|
||||||
|
#ifdef Q_WS_X11
|
||||||
{ "Qt Idle Service",
|
{ "Qt Idle Service",
|
||||||
NS_IDLE_SERVICE_CID,
|
NS_IDLE_SERVICE_CID,
|
||||||
"@mozilla.org/widget/idleservice;1",
|
"@mozilla.org/widget/idleservice;1",
|
||||||
nsIdleServiceQtConstructor },
|
nsIdleServiceQtConstructor },
|
||||||
|
#endif
|
||||||
{ "Qt Sound",
|
{ "Qt Sound",
|
||||||
NS_SOUND_CID,
|
NS_SOUND_CID,
|
||||||
"@mozilla.org/sound;1",
|
"@mozilla.org/sound;1",
|
||||||
|
|
|
@ -59,7 +59,9 @@
|
||||||
|
|
||||||
#include "nsQtKeyUtils.h"
|
#include "nsQtKeyUtils.h"
|
||||||
|
|
||||||
|
#ifdef Q_WS_X11
|
||||||
#include <X11/XF86keysym.h>
|
#include <X11/XF86keysym.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "nsWidgetAtoms.h"
|
#include "nsWidgetAtoms.h"
|
||||||
|
|
||||||
|
@ -97,12 +99,15 @@
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
#include <qdesktopwidget.h>
|
#include <qdesktopwidget.h>
|
||||||
#include <qwidget.h>
|
#include <qwidget.h>
|
||||||
#include "qx11info_x11.h"
|
|
||||||
#include <qcursor.h>
|
#include <qcursor.h>
|
||||||
#include <qobject.h>
|
#include <qobject.h>
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef Q_WS_X11
|
||||||
|
#include "qx11info_x11.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
|
|
||||||
#include "mozqwidget.h"
|
#include "mozqwidget.h"
|
||||||
|
@ -821,9 +826,11 @@ nsWindow::GetNativeData(PRUint32 aDataType)
|
||||||
return SetupPluginPort();
|
return SetupPluginPort();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef Q_WS_X11
|
||||||
case NS_NATIVE_DISPLAY:
|
case NS_NATIVE_DISPLAY:
|
||||||
return mDrawingarea->x11Info().display();
|
return mDrawingarea->x11Info().display();
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
case NS_NATIVE_GRAPHIC: {
|
case NS_NATIVE_GRAPHIC: {
|
||||||
NS_ASSERTION(nsnull != mToolkit, "NULL toolkit, unable to get a GC");
|
NS_ASSERTION(nsnull != mToolkit, "NULL toolkit, unable to get a GC");
|
||||||
|
@ -1042,12 +1049,7 @@ static int gDoubleBuffering = -1;
|
||||||
nsEventStatus
|
nsEventStatus
|
||||||
nsWindow::OnExposeEvent(QPaintEvent *aEvent)
|
nsWindow::OnExposeEvent(QPaintEvent *aEvent)
|
||||||
{
|
{
|
||||||
if (gDoubleBuffering == -1) {
|
//fprintf (stderr, "===== Expose start\n");
|
||||||
if (getenv("MOZ_NO_DOUBLEBUFFER"))
|
|
||||||
gDoubleBuffering = 0;
|
|
||||||
else
|
|
||||||
gDoubleBuffering = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mIsDestroyed) {
|
if (mIsDestroyed) {
|
||||||
LOG(("Expose event on destroyed window [%p] window %p\n",
|
LOG(("Expose event on destroyed window [%p] window %p\n",
|
||||||
|
@ -1229,6 +1231,8 @@ nsWindow::OnExposeEvent(QPaintEvent *aEvent)
|
||||||
ctx = nsnull;
|
ctx = nsnull;
|
||||||
targetSurface = nsnull;
|
targetSurface = nsnull;
|
||||||
|
|
||||||
|
//fprintf (stderr, "===== Expose end\n");
|
||||||
|
|
||||||
// check the return value!
|
// check the return value!
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -1874,6 +1878,7 @@ nsWindow::SetWindowClass(const nsAString &xulWinType)
|
||||||
nsXPIDLString brandName;
|
nsXPIDLString brandName;
|
||||||
GetBrandName(brandName);
|
GetBrandName(brandName);
|
||||||
|
|
||||||
|
#ifdef Q_WS_X11
|
||||||
XClassHint *class_hint = XAllocClassHint();
|
XClassHint *class_hint = XAllocClassHint();
|
||||||
if (!class_hint)
|
if (!class_hint)
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
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_class);
|
||||||
nsMemory::Free(class_hint->res_name);
|
nsMemory::Free(class_hint->res_name);
|
||||||
XFree(class_hint);
|
XFree(class_hint);
|
||||||
|
#endif
|
||||||
|
|
||||||
return NS_OK;
|
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
|
// 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
|
// error later when this happens (when the persistence timer fires
|
||||||
// and GetWindowPos is called)
|
// and GetWindowPos is called)
|
||||||
|
#ifdef Q_WS_X11
|
||||||
XSync(mDrawingarea->x11Info().display(), False);
|
XSync(mDrawingarea->x11Info().display(), False);
|
||||||
|
#endif
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -2589,6 +2598,13 @@ nsWindow::createQWidget(QWidget *parent, nsWidgetInitData *aInitData)
|
||||||
Qt::WFlags flags = Qt::Widget;
|
Qt::WFlags flags = Qt::Widget;
|
||||||
const char *windowName = NULL;
|
const char *windowName = NULL;
|
||||||
|
|
||||||
|
if (gDoubleBuffering == -1) {
|
||||||
|
if (getenv("MOZ_NO_DOUBLEBUFFER"))
|
||||||
|
gDoubleBuffering = 0;
|
||||||
|
else
|
||||||
|
gDoubleBuffering = 1;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_WIDGETS
|
#ifdef DEBUG_WIDGETS
|
||||||
qDebug("NEW WIDGET\n\tparent is %p (%s)", (void*)parent,
|
qDebug("NEW WIDGET\n\tparent is %p (%s)", (void*)parent,
|
||||||
parent ? qPrintable(parent->objectName()) : "null");
|
parent ? qPrintable(parent->objectName()) : "null");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче