seasoned_geek: The attachment is difficult to apply since is diffing each file individually instead of a patch for the whole change.
It's all too complex. There appears to be some local problem with the order of left and right on your platform. There's also some unnecessary casting/truncation. It can just use the right side of the requested drawing rectangle and rely on FillRectangleAligned so there isn't a fuzzy partial pixel edge. PRectangle rcSegment = rcLine; rcSegment.left = vsDraw.theEdge.column * vsDraw.spaceWidth; surface->FillRectangleAligned(rcSegment, Fill(vsDraw.theEdge.colour));
Well, what you suggest was my first attempt and it definitely didn't work. There was also a dirth of comments in the code for the necessary functions.
Thanks for looking at it.
-- Roland Hughes, President Logikal Solutions (630)-205-1593 (cell) https://theminimumyouneedtoknow.com https://infiniteexposure.net https://johnsmith-book.com
I did some poking and the left-right problem isn't a local problem on my system. It's a fundamental bug of Gtk based/built Scintilla.
https://forum.xfce.org/viewtopic.php?id=15530
https://forum.xfce.org/viewtopic.php?id=15809
https://community.frame.work/t/responded-fedora-39-40-beta-gnome-45-46-dual-monitor-window-positioning-issue/47841
When initially hooked up to my NVS 510 card these monitors are "found" in the wrong order.
Like everybody else I drug them around and saved.
People who run even more monitors
Have even more issues with Gtk based applications. It appears Gtk
gets the monitor information from the hardware or OS level, not
the desktop level so it is completely unaware of position and
orientation changes made by the user. As such, rectangle math
cannot be trusted. It is also why the first cut using
FillRectangleAligned() filled in the wrong direction.
Just passing along since this won't be an issue in CsScintilla
--
You received this message because you are subscribed to a topic in the Google Groups "scintilla-interest" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scintilla-interest/eLXYhJjPf20/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scintilla-inter...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scintilla-interest/e3d43ff3-ea0d-4720-9adc-4d62aeaef1b3%40logikalsolutions.com.
It does.
People running multiple monitors have mostly stopped using gtk based stuff. This is especially true for NVIDIA users. Driver updates for my 4-port card, for whatever reason, change the port search order. Today, when I booted after applying updates and took the picture for the reply, it found the monitor I want to be on the left (because it is) first. Previously it was always identified as 2 and had to be drug over which is how it was all last week and the day I was working on that code. During that time this code:
PRectangle rcSegment = rcLine; rcSegment.left = vsDraw.theEdge.column * vsDraw.spaceWidth; surface->FillRectangleAligned(rcSegment, Fill(vsDraw.theEdge.colour));
highlighted in the wrong direction. Today it worked because the
monitors were found in the "correct" order at power up.
I don't know how to phrase this properly. Don't know if "flipped"
is the correct word. Gtk has had a decades long problem with
multiple monitors. If you are a one monitor user, Gtk is good for
you.
In a Utopian world all of the extended monitors exist in one quadrant. We will say the right one because it makes it easier to talk about. The first monitor found per the hardware and driver is at (0,0). Yes, things grow negative and all that other stuff. I just want to take it back to 5th grade math class where we tried to do everything in the quadrant that was positive on both rails.
When you change the monitor order so the second is in front of the first found, the desktop appears to re-giz its view of the world putting the second monitor at (0,0) and the first monitor directly after it. Gtk, appears to still use the old (0,0) definition and puts the second monitor on the other side of the Y axis.
If that is what you mean by "flipped", then yeah. Gtk continues on rather oblivious to the actual monitor layout. Either oblivious or improperly updated.
I haven't personally tried this, but I'm told Gtk applications running on Cinnamon/KDE/non-Gtk based desktop really get hosed if you have one of these monitors.
To them (0,0) stays where it was even though the rest of the desktop knows it is now in Portrait mode.
As I recall (and I'm old so could be incorrect) XFCE was a Gtk based desktop. Almost nobody uses it anymore and new distros don't add support for it because it has had this problem forever.
The monitor positions in global coordinates shouldn't matter as GTK provides a window coordinate space to draw in. Was the problem here that the margin width and scroll position 'xStart' weren't added in as they are for the EdgeVisualStyle::Line case?
No. It highlighted FROM column 80 to the left margin instead of the right. Been a problem with Gtk and multiple monitors for a long time. That's why so few Linux distros bother supporting Gtk based desktops anymore.
Problem is worse under some distros, like Arch, which doesn't automatically store "RightOf" when monitors are dragged.
One of the reasons I chose to use Cinnamon edition of Manjaro is the fact it gives you a real desktop which Gnome does not. The other reason was to see just how failed the Wayland experiment is. Yes, that's a Mint forum, but a pretty accurate summary of where things were in January. I can tell you that even with the latest updates on Manjaro Cinnamon the lock screen will not accept any password. Wayland does X11 emulation and it isn't very polite at informing X11 about the current arrangement of monitors. At the time of the problem I did not open the file documented in that post to see if it was missing the "RightOf" line. I suspect it was.
At the time I was creating the Yocto built OS for this device, we had a real PITA. Due to a smoke filled room mafia-type deal between Qt, NXP, and The Yocto Project, they dropped all X-11. You had to use Docker containers and Wayland. We could not, by application, control either screen position or orientation. The YAML for the container would let us control orientation, but not screen position. Instead of a group of dynamically positional "application bricks" they had to be bricks run by a single full screen window inside of a single app.
With this Wayland stuff there is now a disconnect between what the actual desktop knows and what Gtk (or other old libraries) "see" when making raw low-level X-11 calls. I don't expect the emulator to "improve" because the boys and girls pushing Wayland want to purge all X-11. Not wanting to totally dominate the mailing list with this topic, but a good discussion can be found here.
Basically all of the higher end graphics cards/drivers and desktops have compositors and Wayland wants to be "One Compositor to Rule Them All" with a direct connection to the kernel. Well that's just bright and beautiful for the "desktop" user. Ass-U-Me-ing every OpenSource product also abandons X-11 and re-writes with a Wayland UI library all creatures great and small will sleep as one tonight.
In my world, embedded systems for mostly medical devices, we don't need/want/or desire a "desktop" layer be forcibly inserted into the device that is trying to fix your heart or perform some other medical function. Despite all its flaws X-11 was proven, FDA approved (many version) and we knew just what to strip out to make it secure. Many/most of our devices don't even allow in-bound connection from the outside world in any form.
So yes Neil, I knew all of this; it comes up during every project; yet I still flipped left and right to make it work because that is what I had to do. I believe there was and possibly still is a series of calls one can do with X-11 based libraries to determine if this problem exists on the target. Didn't dig into that either.
Roland:Was the problem here that the margin width and scroll position 'xStart' weren't added in as they are for the EdgeVisualStyle::Line case?No. It highlighted FROM column 80 to the left margin instead of the right.Did you initially add xStart to the x value at which to start the background colour? The feature will not work correctly if the window is scrolled horizontally or the line number or folding margin is displayed unless these features are taken into account.
So yes Neil, I knew all of this; it comes up during every project; yet I still flipped left and right to make it work because that is what I had to do. I believe there was and possibly still is a series of calls one can do with X-11 based libraries to determine if this problem exists on the target. Didn't dig into that either.Flipping left and right makes no logical sense and is not needed on the 3 platforms I tried. Neil
You didn't look at the links.
The desktops don't bother to fill in RightOf or LeftOf in the X config files. Libraries that process those have no earthly idea which monitor really has (0,0) per the desktop. This is a widely know problem with Gtk that has gotten worse under Wayland-Westin.
No need to worry about it. I'm making EDGE_FULL_BACKGROUND, EDGE_MULTI-BACKGROUND, TAB_LIST changes to CsScintilla. It will just be rough if I want to merge anything from Scintilla in going forward but once I get these merged in I have everything I ever wanted/needed for base editor functionality.
Gtk had a good run, but that run is over.
Just to round out the discussion, I spun up a Manjaro VM so I could test some PKGBUILD stuff. Applied all updates then tried to install Emacs and run it.
While Emacs installed and runs fine on my Dev box, that was weeks ago.
Info "says" it has an X11 display server, but not really. I think it is finding that feeble Wayland X11 emulator.
Only passing this along as Manjaro and seemingly all other
distros are phasing out "purge-GTK" and X11 support.
It appears one must be at GTK 4.0 and there are some hoops to jump through.
https://docs.gtk.org/gtk4/wayland.html
Manjaro is an Arch derivative so it should "just work"
https://wiki.archlinux.org/title/Wayland
Then again, they do say "testing"
https://forum.manjaro.org/t/cinnamon-6-on-wayland-is-here-and-testing/152490
Even had to set a separate Github up for Wayland bugs.
Just to round out the discussion, I spun up a Manjaro VM so I could test some PKGBUILD stuff. Applied all updates then tried to install Emacs and run it.
While Emacs installed and runs fine on my Dev box, that was weeks ago.
Info "says" it has an X11 display server, but not really. I think it is finding that feeble Wayland X11 emulator.
Only passing this along as Manjaro and seemingly all other distros are phasing out "purge-GTK" and X11 support.
It appears one must be at GTK 4.0 and there are some hoops to jump through.
https://docs.gtk.org/gtk4/wayland.html
Manjaro is an Arch derivative so it should "just work"
https://wiki.archlinux.org/title/Wayland
Then again, they do say "testing"
https://forum.manjaro.org/t/cinnamon-6-on-wayland-is-here-and-testing/152490
Even had to set a separate Github up for Wayland bugs.
-- Roland Hughes, President Logikal Solutions (630)-205-1593 (cell) https://theminimumyouneedtoknow.com https://infiniteexposure.net https://johnsmith-book.com
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-inter...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scintilla-interest/3adfb447-8bd6-44bd-a004-728bf0d95597%40logikalsolutions.com.