diff --git a/Makefile b/Makefile index 2c2002119..7e11df560 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,15 @@ UPPDIR1 = ./uppsrc/ -UPPDIR2 = /home/cxl/.config/u++/umk/UppHub/gdal/ -UPPDIR3 = /home/cxl/.config/u++/umk/UppHub/eigen/ +UPPDIR2 = /home/cxl/.config/u++/theide/UppHub/gdal/ +UPPDIR3 = /home/cxl/.config/u++/theide/UppHub/eigen/ +UPPDIR4 = /home/cxl/.config/u++/theide/UppHub/Functions4U/ UPPOUT = .cache/upp.out/ -CINC = -I$(UPPDIR1) -I$(UPPDIR2) -I$(UPPDIR3) `pkg-config --cflags libpng` `pkg-config --cflags freetype2` `pkg-config --cflags fontconfig` `pkg-config --cflags x11` `pkg-config --cflags xcb` `pkg-config --cflags expat` `pkg-config --cflags xinerama` `pkg-config --cflags xrender` `pkg-config --cflags xft` `pkg-config --cflags xdmcp` `pkg-config --cflags xext` `pkg-config --cflags gtk+-3.0` `pkg-config --cflags libnotify` -I./ -I$(UPPOUT) +CINC = -I$(UPPDIR1) -I$(UPPDIR2) -I$(UPPDIR3) -I$(UPPDIR4) `pkg-config --cflags libpng` `pkg-config --cflags freetype2` `pkg-config --cflags fontconfig` `pkg-config --cflags x11` `pkg-config --cflags xcb` `pkg-config --cflags expat` `pkg-config --cflags xinerama` `pkg-config --cflags xrender` `pkg-config --cflags xft` `pkg-config --cflags xdmcp` `pkg-config --cflags xext` `pkg-config --cflags gtk+-3.0` `pkg-config --cflags libnotify` -I./ -I$(UPPOUT) Macro = -DflagGUI -DflagGCC -DflagSHARED -DflagPOSIX -DflagLINUX CXX = c++ LINKER = $(CXX) CFLAGS = -O3 -ffunction-sections -fdata-sections -CXXFLAGS = -O3 -ffunction-sections -fdata-sections -std=c++17 +CXXFLAGS = -O3 -ffunction-sections -fdata-sections -std=c++14 LDFLAGS = -Wl,--gc-sections $(LINKOPTIONS) LIBPATH = AR = ar -sr diff --git a/Makefile.in b/Makefile.in index 2c2002119..7e11df560 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,14 +1,15 @@ UPPDIR1 = ./uppsrc/ -UPPDIR2 = /home/cxl/.config/u++/umk/UppHub/gdal/ -UPPDIR3 = /home/cxl/.config/u++/umk/UppHub/eigen/ +UPPDIR2 = /home/cxl/.config/u++/theide/UppHub/gdal/ +UPPDIR3 = /home/cxl/.config/u++/theide/UppHub/eigen/ +UPPDIR4 = /home/cxl/.config/u++/theide/UppHub/Functions4U/ UPPOUT = .cache/upp.out/ -CINC = -I$(UPPDIR1) -I$(UPPDIR2) -I$(UPPDIR3) `pkg-config --cflags libpng` `pkg-config --cflags freetype2` `pkg-config --cflags fontconfig` `pkg-config --cflags x11` `pkg-config --cflags xcb` `pkg-config --cflags expat` `pkg-config --cflags xinerama` `pkg-config --cflags xrender` `pkg-config --cflags xft` `pkg-config --cflags xdmcp` `pkg-config --cflags xext` `pkg-config --cflags gtk+-3.0` `pkg-config --cflags libnotify` -I./ -I$(UPPOUT) +CINC = -I$(UPPDIR1) -I$(UPPDIR2) -I$(UPPDIR3) -I$(UPPDIR4) `pkg-config --cflags libpng` `pkg-config --cflags freetype2` `pkg-config --cflags fontconfig` `pkg-config --cflags x11` `pkg-config --cflags xcb` `pkg-config --cflags expat` `pkg-config --cflags xinerama` `pkg-config --cflags xrender` `pkg-config --cflags xft` `pkg-config --cflags xdmcp` `pkg-config --cflags xext` `pkg-config --cflags gtk+-3.0` `pkg-config --cflags libnotify` -I./ -I$(UPPOUT) Macro = -DflagGUI -DflagGCC -DflagSHARED -DflagPOSIX -DflagLINUX CXX = c++ LINKER = $(CXX) CFLAGS = -O3 -ffunction-sections -fdata-sections -CXXFLAGS = -O3 -ffunction-sections -fdata-sections -std=c++17 +CXXFLAGS = -O3 -ffunction-sections -fdata-sections -std=c++14 LDFLAGS = -Wl,--gc-sections $(LINKOPTIONS) LIBPATH = AR = ar -sr diff --git a/umkMakefile b/umkMakefile index 9e107704a..6accdd44f 100644 --- a/umkMakefile +++ b/umkMakefile @@ -1,14 +1,15 @@ UPPDIR1 = ./uppsrc/ -UPPDIR2 = /home/cxl/.config/u++/umk/UppHub/gdal/ -UPPDIR3 = /home/cxl/.config/u++/umk/UppHub/eigen/ +UPPDIR2 = /home/cxl/.config/u++/theide/UppHub/gdal/ +UPPDIR3 = /home/cxl/.config/u++/theide/UppHub/eigen/ +UPPDIR4 = /home/cxl/.config/u++/theide/UppHub/Functions4U/ UPPOUT = .cache/upp.out/ -CINC = -I$(UPPDIR1) -I$(UPPDIR2) -I$(UPPDIR3) `pkg-config --cflags libpng` `pkg-config --cflags freetype2` `pkg-config --cflags fontconfig` `pkg-config --cflags x11` `pkg-config --cflags xcb` `pkg-config --cflags expat` -I./ -I$(UPPOUT) +CINC = -I$(UPPDIR1) -I$(UPPDIR2) -I$(UPPDIR3) -I$(UPPDIR4) `pkg-config --cflags libpng` `pkg-config --cflags freetype2` `pkg-config --cflags fontconfig` `pkg-config --cflags x11` `pkg-config --cflags xcb` `pkg-config --cflags expat` -I./ -I$(UPPOUT) Macro = -DflagGCC -DflagSHARED -DflagPOSIX -DflagLINUX CXX = c++ LINKER = $(CXX) CFLAGS = -O3 -ffunction-sections -fdata-sections -CXXFLAGS = -O3 -ffunction-sections -fdata-sections -std=c++17 +CXXFLAGS = -O3 -ffunction-sections -fdata-sections -std=c++14 LDFLAGS = -Wl,--gc-sections $(LINKOPTIONS) LIBPATH = AR = ar -sr diff --git a/umkMakefile.in b/umkMakefile.in index 9e107704a..6accdd44f 100644 --- a/umkMakefile.in +++ b/umkMakefile.in @@ -1,14 +1,15 @@ UPPDIR1 = ./uppsrc/ -UPPDIR2 = /home/cxl/.config/u++/umk/UppHub/gdal/ -UPPDIR3 = /home/cxl/.config/u++/umk/UppHub/eigen/ +UPPDIR2 = /home/cxl/.config/u++/theide/UppHub/gdal/ +UPPDIR3 = /home/cxl/.config/u++/theide/UppHub/eigen/ +UPPDIR4 = /home/cxl/.config/u++/theide/UppHub/Functions4U/ UPPOUT = .cache/upp.out/ -CINC = -I$(UPPDIR1) -I$(UPPDIR2) -I$(UPPDIR3) `pkg-config --cflags libpng` `pkg-config --cflags freetype2` `pkg-config --cflags fontconfig` `pkg-config --cflags x11` `pkg-config --cflags xcb` `pkg-config --cflags expat` -I./ -I$(UPPOUT) +CINC = -I$(UPPDIR1) -I$(UPPDIR2) -I$(UPPDIR3) -I$(UPPDIR4) `pkg-config --cflags libpng` `pkg-config --cflags freetype2` `pkg-config --cflags fontconfig` `pkg-config --cflags x11` `pkg-config --cflags xcb` `pkg-config --cflags expat` -I./ -I$(UPPOUT) Macro = -DflagGCC -DflagSHARED -DflagPOSIX -DflagLINUX CXX = c++ LINKER = $(CXX) CFLAGS = -O3 -ffunction-sections -fdata-sections -CXXFLAGS = -O3 -ffunction-sections -fdata-sections -std=c++17 +CXXFLAGS = -O3 -ffunction-sections -fdata-sections -std=c++14 LDFLAGS = -Wl,--gc-sections $(LINKOPTIONS) LIBPATH = AR = ar -sr diff --git a/uppsrc/CtrlCore/Win32Proc.cpp b/uppsrc/CtrlCore/Win32Proc.cpp index 72e9e3d18..c92c9e3b8 100644 --- a/uppsrc/CtrlCore/Win32Proc.cpp +++ b/uppsrc/CtrlCore/Win32Proc.cpp @@ -680,10 +680,14 @@ LRESULT Ctrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) { */ } if(hwnd) { - if(IsWindowUnicode(hwnd)) // TRC 04/10/17: ActiveX unicode patch - return DefWindowProcW(hwnd, message, wParam, lParam); + LRESULT r; + int level = LeaveGuiMutexAll(); + if(IsWindowUnicode(hwnd)) + r = DefWindowProcW(hwnd, message, wParam, lParam); else - return DefWindowProc(hwnd, message, wParam, lParam); + r = DefWindowProc(hwnd, message, wParam, lParam); + EnterGuiMutex(level); + return r; } return 0L; } diff --git a/uppsrc/CtrlLib/LineEdit.cpp b/uppsrc/CtrlLib/LineEdit.cpp index 7f8589985..b734d148c 100644 --- a/uppsrc/CtrlLib/LineEdit.cpp +++ b/uppsrc/CtrlLib/LineEdit.cpp @@ -249,7 +249,7 @@ void LineEdit::RectSelectionLeftRight(int dir, bool homeend) return false; }; - int n = homeend ? 1000 : 1; + int n = homeend ? 2000 : 1; while(n > 0 && (Try(anchor, cursor) || Try(cursor, anchor))) n--; diff --git a/upptst/MTGuiLockResize/MTGuiLockResize.upp b/upptst/MTGuiLockResize/MTGuiLockResize.upp new file mode 100644 index 000000000..5872304d3 --- /dev/null +++ b/upptst/MTGuiLockResize/MTGuiLockResize.upp @@ -0,0 +1,9 @@ +uses + CtrlLib; + +file + main.cpp; + +mainconfig + "" = "GUI"; + diff --git a/upptst/MTGuiLockResize/main.cpp b/upptst/MTGuiLockResize/main.cpp new file mode 100644 index 000000000..f36a17688 --- /dev/null +++ b/upptst/MTGuiLockResize/main.cpp @@ -0,0 +1,33 @@ +#include + +using namespace Upp; + +struct MyApp : TopWindow { + Label label; + + MyApp() { + Sizeable().Zoomable(); + + Add(label.LeftPos(0, 1000).TopPos(0, 200)); + label.SetFont(Arial(200)); + + Thread::Start([=] { + int ii = 0; + for(;;) { + Sleep(100); + GuiLock __; + if(IsShutdownThreads()) + break; + label = AsString(ii++); + } + }); + } + ~MyApp() { + ShutdownThreads(); + } +}; + +GUI_APP_MAIN +{ + MyApp().Run(); +}