screen height instead of monitor's because we convert coordinates
from Xlib area.
(movewindow::): use Xlib screen height because we're operating in
Xlib coordinate system.
(screenList): fill monitor depth with value returned by
windowPathForScreen with monitor at index 0 (screen_id already set so
method will get correct screen_id).
* Source/x11/XGServerEvent.m (processEvent:): fixed indentaion.
(_OSFrameToXHints:for:): use Xlib screen height instead of monitor's
because we convert coordinates to Xlib area.
* Source/x11/XGServerEvent.m (processEvent:): update monitor_id from
NSWindow's screen number (it could change after event processing).
(mouseLocationOnScreen🪟): use Xlib screen height instead of
monitor's. Added comment to code that should be probably removed
later.
explicit and removed additional copy before calling this function.
This function should now do what the comment above it says.
(alphaMaskForImage): Slightly cleaner code.
`screen_id`; `monitor_id` element was added. Made use of
`screen_id` and `monitor_id` where it's appropriate.
* Removed `screen` parameter from methods which contains it in name.
Methods were renamed to remove `Screen` and `FromScreen`.
* Source/x11/XGServerWindow.m (screenList): change with assumption
that Xlib screen is one per application.
Failback code to RandR-related always creates arrays with one element
(no enumeration needed). Create `monitor` structure in failback (non-RandR)
code. Use `screen_id` MonitorDevice structure element to hold Xlib screen
ID.
(windowDepthForScreen:): assume that `screen` parameter is a Xlib screen ID,
simplify code - `screen` will be used with RandR or not.
(availableDepthsForScreen:): changed with assumption that `screen` is a index
of element in `monitors` structure.
* Source/x11/XGServer.m (_initXContext): initialize `monitors` array
early here before first use (calls to XGServerWindow methods).
code. Failback to Xlib generic method if any no RandR available or
RandR function call was unsuccessful. In Xlib generic method fill in
monitors array with values.
(boundsForScreen:): use values from cached `monitors` array since
-screenList fills it on both cases with or without RandR available.
`monitors` array items.
* Source/x11/XGServerWindow.m: use `monitorsCount` instead of local
variable `count` or ScreenCount() value.
* ChangeLog: update to the latest changes.
Mark methods where usage of X Screen as parameter is correct and where isn't.
-boundsForScreen: to get correct screen dimensions if RandR is supported.
(_OSFrameToXHints:for:): ditto.
(_XFrameToOSFrame:for:): ditto.
(movewindow::): ditto.
(windowbounds:): ditto.
(setMouseLocation:onScreen:): ditto.
* Source/x11/XGDragView.m: ditto.
* Source/x11/XGServerEvent.m (processEvent:): destroy NSScreen screens
list to be regenereated on next call. This change updates ivars of
NSScreen (_frame, _depth) by recreating NSScreen instances.
(mouseLocationOnScreen🪟): use -boundsForScreen: to get correct
screen dimensions if RandR is supported.
ivars were added.
* Source/x11/XGServer.m (_initXContext): get RandR event and error base.
* Source/x11/XGServerEvent.m (processEvent:): pack several RandR events
into one notification post.
enabled get screen dimensions using Xrandr objects.
* Source/x11/XGServerEvent.m (processEvent:): process Xrandr event and
send NSApplicationDidChangeScreenParametersNotification.
* Source/x11/XGServer.m (_initXContext): subscribe to the Xrandr event.
* Source/art/path.m:,
* Source/art/image.m (DPSimage:::::::::::):
fixed type formatting specifiers.
* Source/art/ftfont.m: removed include to ftfont-old.m.
(drawString:at::to::::::::color::::transform:deltas:::widthChar:drawinfo:):,
(drawGlyphs::at::to::::::color::::transform:drawinfo:):,
(drawGlyphs::at::to::::::alpha::color::::transform:drawinfo:):,
(bezierpath_funcs):,
fixed type formatting specifiers; moved interface declaration of FTFontInfo
to ftfont.h; removed GCCism.
* Source/art/ftfont.h: moved interface declaration of FTFontInfo here.
* Source/art/composite.m: fixed type formatting specifiers.
* Source/art/FTFontEnumerator.m (load_font_configuration): fixed type
formatting specifiers.
- use lowerCamelCase for objects and underscores for primitive types;
- added and used `this_window` variable - represents window that has
received TakeFocus event - instead of `cWin` (last used window by
backend);
- do not ignore TakeFocus request if now key window was set
and if main application menu received request.
image_mask().
(swapColors): new function to convert colors from ARGB order into RGBA
(big-endian systems) or BGRA (little-endian systems).
(_createAppIconPixmaps): use swapColors() and remove unused code.
(restrictWindow:toImage:): use alphaMaskForImage().
(imagecursor:::): use swapColors() and remove unused code.
off-by-one mistake during alpha handling. Enable disabled code and
remove temprorary one.
(window::::): set NetWM icon to window for all EWMH capable WMs even
it's WindowMaker.
(image_mask): new function to create alpha mask for image. It's based
on xgps_cursor_mask() code with additional argument `alpha_treshold`.
This function may be used for images (alpha_treshold == 0) with real
alpha mask and for cursors (if no Xcursor library is used - no alpha
is used, no shadows in cursors, alpha_treshold == 158 is used to cut
transparent pixels).
(_createAppIconPixmaps): icon pixmap creation rewritten to support
images with alpha channel using wraster functions. Use image_mask().
(restrictWindow:toImage:): use image_mask() instead of
xgps_cursor_mask().
(xgps_cursor_mask): removed as image_mask() replaced it.
Guard xgps_cursor_image( with #if - will not be compiled if Xcursor
is used.
(imagecursor:::): use image_mask() instead of xgps_cursor_mask().
to _convertToFormatBitsPerSample::::::::. Fixes display of colored
mouse cursor images.
(standardcursor::): cleanup in Xlib cursors handling. Additional
cursor types were added: GSClosedHandCursor, GSOpenHandCursor.
Removed GSDisappearingItemCursor type handling - it loads in NSCursor
from image.
and setups observer for defaults changes.
(mouseOptionsChanged:): new method. Read mouse properties from user defaults.
(processEvent:): respect mouse options on ButtonPress and ButtonRelease events.
* Source/x11/XGServer.m (dealloc): remove notification observer.
* Source/opal/OpalContext.m (-GSSetDevice:::): Get height form
surface if no y value is given.
* Source/opal/OpalSurface.m: Rewrite to handle the case where
device is not set.