Rename additional global functions and variables for tqt3

pull/1/head
Timothy Pearson 13 years ago
parent 03e470d6a8
commit 799430b07f

@ -47,7 +47,7 @@
# include <X11/Xlib.h> # include <X11/Xlib.h>
# ifdef HAVE_XRENDER # ifdef HAVE_XRENDER
# include <X11/extensions/Xrender.h> // schroder # include <X11/extensions/Xrender.h> // schroder
extern bool qt_use_xrender; extern bool tqt_use_xrender;
# endif # endif
#else #else
#undef HAVE_XRENDER #undef HAVE_XRENDER

@ -125,7 +125,7 @@ dimension, so as to draw the scrollbar at the correct size.
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include "qtc_fixx11h.h" #include "qtc_fixx11h.h"
static const Atom constNetMoveResize = XInternAtom(qt_xdisplay(), "_NET_WM_MOVERESIZE", False); static const Atom constNetMoveResize = XInternAtom(tqt_xdisplay(), "_NET_WM_MOVERESIZE", False);
static const TQWidget * getTopLevel(const TQWidget *widget) static const TQWidget * getTopLevel(const TQWidget *widget)
{ {
const TQWidget *w=widget; const TQWidget *w=widget;
@ -141,8 +141,8 @@ static void emitMenuSize(const TQWidget *widget, unsigned short size)
if(w) if(w)
{ {
static const Atom constAtom = XInternAtom(qt_xdisplay(), MENU_SIZE_ATOM, False); static const Atom constAtom = XInternAtom(tqt_xdisplay(), MENU_SIZE_ATOM, False);
XChangeProperty(qt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(), XChangeProperty(tqt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(),
constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&size, 1); constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&size, 1);
} }
} }
@ -153,8 +153,8 @@ void setBgndProp(TQWidget *widget, unsigned short app)
if(w) if(w)
{ {
static const Atom constAtom = XInternAtom(qt_xdisplay(), BGND_ATOM, False); static const Atom constAtom = XInternAtom(tqt_xdisplay(), BGND_ATOM, False);
XChangeProperty(qt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(), XChangeProperty(tqt_xdisplay(), w->parentWidget() ? w->parentWidget()->winId() : w->winId(),
constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&app, 1); constAtom, XA_CARDINAL, 16, PropModeReplace, (unsigned char *)&app, 1);
} }
} }
@ -166,7 +166,7 @@ static void triggerWMMove(const TQWidget *w, const TQPoint &p)
XEvent xev; XEvent xev;
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
xev.xclient.message_type = constNetMoveResize; xev.xclient.message_type = constNetMoveResize;
xev.xclient.display = qt_xdisplay(); xev.xclient.display = tqt_xdisplay();
xev.xclient.window = w->parentWidget() ? w->parentWidget()->winId() : w->winId(); xev.xclient.window = w->parentWidget() ? w->parentWidget()->winId() : w->winId();
xev.xclient.format = 32; xev.xclient.format = 32;
xev.xclient.data.l[0] = p.x(); xev.xclient.data.l[0] = p.x();
@ -174,8 +174,8 @@ static void triggerWMMove(const TQWidget *w, const TQPoint &p)
xev.xclient.data.l[2] = 8; // NET::Move xev.xclient.data.l[2] = 8; // NET::Move
xev.xclient.data.l[3] = Button1; xev.xclient.data.l[3] = Button1;
xev.xclient.data.l[4] = 0; xev.xclient.data.l[4] = 0;
XUngrabPointer(qt_xdisplay(), CurrentTime); XUngrabPointer(tqt_xdisplay(), CurrentTime);
XSendEvent(qt_xdisplay(), qt_xrootwin(), False, XSendEvent(tqt_xdisplay(), tqt_xrootwin(), False,
SubstructureRedirectMask | SubstructureNotifyMask, &xev); SubstructureRedirectMask | SubstructureNotifyMask, &xev);
} }
@ -1941,10 +1941,10 @@ void TQtCurveStyle::unPolish(TQWidget *widget)
static void sendXEvent(TQDialog *dlg, const char *msg) static void sendXEvent(TQDialog *dlg, const char *msg)
{ {
static Atom msgTypeAtom = XInternAtom(qt_xdisplay(), "_NET_WM_STATE", False); static Atom msgTypeAtom = XInternAtom(tqt_xdisplay(), "_NET_WM_STATE", False);
XEvent xev; XEvent xev;
Atom atom=XInternAtom(qt_xdisplay(), msg, False); Atom atom=XInternAtom(tqt_xdisplay(), msg, False);
xev.xclient.type = ClientMessage; xev.xclient.type = ClientMessage;
xev.xclient.serial = 0; xev.xclient.serial = 0;
@ -1958,7 +1958,7 @@ static void sendXEvent(TQDialog *dlg, const char *msg)
xev.xclient.data.l[3] = 0; xev.xclient.data.l[3] = 0;
xev.xclient.data.l[4] = 0; xev.xclient.data.l[4] = 0;
XSendEvent(qt_xdisplay(), qt_xrootwin(), False, XSendEvent(tqt_xdisplay(), tqt_xrootwin(), False,
SubstructureRedirectMask | SubstructureNotifyMask, &xev); SubstructureRedirectMask | SubstructureNotifyMask, &xev);
} }
@ -1966,7 +1966,7 @@ bool TQtCurveStyle::appIsNotEmbedded(TQDialog *dlg)
{ {
Window win; Window win;
if(!XGetTransientForHint(qt_xdisplay(), dlg->winId(), &win) || (int)win < 1000) if(!XGetTransientForHint(tqt_xdisplay(), dlg->winId(), &win) || (int)win < 1000)
return true; return true;
// OK, dialog has been set transient, so there is no need for this event filter anymore :-) // OK, dialog has been set transient, so there is no need for this event filter anymore :-)
@ -2320,15 +2320,15 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event)
int rx, ry; int rx, ry;
Window win; Window win;
if(!XGetTransientForHint(qt_xdisplay(), dlg->winId(), &win) || if(!XGetTransientForHint(tqt_xdisplay(), dlg->winId(), &win) ||
win!=activeWindow->winId()) win!=activeWindow->winId())
{ {
XSetTransientForHint(qt_xdisplay(), dlg->winId(), XSetTransientForHint(tqt_xdisplay(), dlg->winId(),
activeWindow->winId()); activeWindow->winId());
if(XGetWindowAttributes(qt_xdisplay(), activeWindow->winId(), &attr)) if(XGetWindowAttributes(tqt_xdisplay(), activeWindow->winId(), &attr))
{ {
XTranslateCoordinates(qt_xdisplay(), activeWindow->winId(), XTranslateCoordinates(tqt_xdisplay(), activeWindow->winId(),
attr.root, -attr.border_width, -16, attr.root, -attr.border_width, -16,
&rx, &ry, &win); &rx, &ry, &win);

Loading…
Cancel
Save