mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-30 06:12:22 -06:00
CtrlCore: Fixed to compile in Linux
This commit is contained in:
parent
74a3b4574e
commit
20c352c7c9
5 changed files with 1 additions and 48 deletions
|
|
@ -209,13 +209,6 @@ void Ctrl::WndInvalidateRect(const Rect& r)
|
|||
}
|
||||
}
|
||||
|
||||
void Ctrl::WndScrollView(const Rect& r, int dx, int dy)
|
||||
{
|
||||
GuiLock __;
|
||||
LLOG("Scroll View " << r);
|
||||
WndInvalidateRect(r);
|
||||
}
|
||||
|
||||
bool Ctrl::IsWndOpen() const {
|
||||
GuiLock __;
|
||||
// DLOG("IsWndOpen " << Upp::Name(this) << ": " << (bool)top);
|
||||
|
|
|
|||
|
|
@ -963,9 +963,6 @@ bool Ctrl::ProcessEvents0(bool *quit, bool fetch)
|
|||
AnimateCaret();
|
||||
if(quit)
|
||||
*quit = IsEndSession();
|
||||
for(int i = 0; i < wins.GetCount(); i++)
|
||||
if(wins[i].ctrl)
|
||||
wins[i].ctrl->SyncScroll();
|
||||
ProcessInvalids();
|
||||
FetchEvents(FALSE); // To perform any pending GDK_EXPOSE
|
||||
gdk_display_flush(gdk_display_get_default());
|
||||
|
|
|
|||
|
|
@ -532,13 +532,6 @@ void Ctrl::WndInvalidateRect(const Rect& r)
|
|||
}
|
||||
}
|
||||
|
||||
void Ctrl::WndScrollView(const Rect& r, int dx, int dy)
|
||||
{
|
||||
GuiLock __;
|
||||
LLOG("ScrollView " << rect);
|
||||
WndInvalidateRect(r);
|
||||
}
|
||||
|
||||
bool Ctrl::SweepConfigure(bool wait)
|
||||
{
|
||||
Ptr<Ctrl> this_ = this;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ DHCtrl::DHCtrl()
|
|||
UserVisualInfo = 0;
|
||||
|
||||
// No background painting
|
||||
backpaint = NOBACKPAINT;
|
||||
// transparent = true;
|
||||
hwnd = 0;
|
||||
} // END Constructor class DHCtrl
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@ Ptr<Ctrl> Ctrl::popupWnd;
|
|||
|
||||
Point Ctrl::mousePos;
|
||||
|
||||
static int s_starttime;
|
||||
|
||||
void Ctrl::DoPaint(const Vector<Rect>& invalid)
|
||||
{
|
||||
GuiLock __;
|
||||
|
|
@ -72,27 +70,6 @@ void Ctrl::DoPaint(const Vector<Rect>& invalid)
|
|||
}
|
||||
}
|
||||
|
||||
void Ctrl::WndScrollView(const Rect& r, int dx, int dy)
|
||||
{
|
||||
GuiLock __;
|
||||
if(r.IsEmpty() || !GetWindow()) return;
|
||||
int cx = r.Width() - abs(dx);
|
||||
int cy = r.Height() - abs(dy);
|
||||
GC gc = XCreateGC(Xdisplay, GetWindow(), 0, 0);
|
||||
XCopyArea(Xdisplay, GetWindow(), GetWindow(), gc,
|
||||
r.left + max(-dx, 0), r.top + max(-dy, 0), cx, cy,
|
||||
r.left + max(dx, 0), r.top + max(dy, 0));
|
||||
XFreeGC(Xdisplay, gc);
|
||||
XWindow *xw = GetXWindow();
|
||||
Vector<Rect> ur;
|
||||
if(xw)
|
||||
for(int i = 0; i < xw->invalid.GetCount(); i++)
|
||||
if(xw->invalid[i].Intersects(r))
|
||||
ur.Add(xw->invalid[i]);
|
||||
for(int i = 0; i < ur.GetCount(); i++)
|
||||
Invalidate(*xw, ur[i].Offseted(dx, dy));
|
||||
}
|
||||
|
||||
bool Ctrl::IsWaitingEvent()
|
||||
{
|
||||
ASSERT_(IsMainThread(), "IsWaitingEvent can only run in the main thread");
|
||||
|
|
@ -305,11 +282,8 @@ void Ctrl::ProcessEvent(XEvent *event)
|
|||
return;
|
||||
}
|
||||
XWindow& w = xmap[q];
|
||||
if(w.ctrl) {
|
||||
if(w.ctrl)
|
||||
w.ctrl->EventProc(w, event);
|
||||
if(w.ctrl)
|
||||
w.ctrl->SyncMoves();
|
||||
}
|
||||
else
|
||||
xmap.SetKey(q, None);
|
||||
DefferedFocusSync();
|
||||
|
|
@ -332,7 +306,6 @@ void Ctrl::TimerAndPaint() {
|
|||
if(Xwindow().GetKey(i) && xw.exposed && xw.invalid.GetCount()) {
|
||||
if(xw.ctrl) {
|
||||
LLOG("..and paint " << UPP::Name(xw.ctrl));
|
||||
xw.ctrl->SyncScroll();
|
||||
Vector<Rect> x = pick(xw.invalid);
|
||||
xw.invalid.Clear();
|
||||
xw.ctrl->DoPaint(x);
|
||||
|
|
@ -721,7 +694,6 @@ void Ctrl::WndUpdate()
|
|||
if(!xwin) return;
|
||||
XWindow& xw = Xwindow().Get(xwin);
|
||||
if(xw.exposed && xw.invalid.GetCount()) {
|
||||
SyncScroll();
|
||||
DoPaint(xw.invalid);
|
||||
xw.invalid.Clear();
|
||||
LTIMING("WndUpdate XSync");
|
||||
|
|
@ -740,7 +712,6 @@ void Ctrl::WndUpdate(const Rect& r)
|
|||
if(!xwin) return;
|
||||
XWindow& xw = Xwindow().Get(xwin);
|
||||
bool dummy;
|
||||
SyncScroll();
|
||||
DoPaint(Intersect(xw.invalid, r, dummy));
|
||||
LTIMING("WndUpdate XSync");
|
||||
XSync(Xdisplay, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue