Commit graph

1348 commits

Author SHA1 Message Date
Sergii Stoian
62bef72ac0 * Headers/x11/XGServer.h: monitorsCount ivar was added to hold
`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.
2020-01-30 01:27:11 +02:00
Sergii Stoian
7ebd2468b1 * Headers/x11/XGServer.h,
* Source/x11/XGServer.m,
* Source/x11/XGServerWindow.m: hold the cache of connected monitor devices
  parameters - `monitors` - a an array structures.
2020-01-29 19:23:52 +02:00
Sergii Stoian
88bc2a4efd
Merge pull request #18 from gnustep/randr
Dynamic screen resolution change support
2020-01-29 14:55:09 +02:00
Sergii Stoian
f38d8a33bd * Source/x11/XGServerEvent.m (processEvent:): add space after comma in
XSync call.
* Source/x11/XGServerWindow.m (boundsForScreen:): use NSZeroRect.
2020-01-28 12:04:03 +02:00
Sergii Stoian
8d9223aa1e Merge branch 'randr' of https://github.com/gnustep/libs-back into randr 2020-01-28 11:53:11 +02:00
Sergii Stoian
6947c49951 * Headers/x11/XGServer.h: split RandR variables defintion into separate
lines.
2020-01-28 11:52:24 +02:00
Fred Kiefer
f0395f07ce
Merge branch 'master' into randr 2020-01-27 23:19:03 +01:00
Sergii Stoian
b5c563a400 * Source/x11/XGServerWindow.m (boundsForScreen:): use screen variable
to identify output in RandR screen resources. Use `boundsRect` local
  variable as return vaalue storage. Cleanup.
2020-01-26 23:56:00 +02:00
Sergii Stoian
111add7ec2
Merge pull request #16 from trunkmaster/master
Clang warnings fix for ART backend
2020-01-26 22:52:55 +02:00
Sergii Stoian
72284c1d37 * Source/art/ftont-old.m: is unused, so removed. 2020-01-26 22:51:22 +02:00
Sergii Stoian
78a5f6a380 * Source/x11/XGServerEvent.m (processEvent:),
* Source/x11/XGServer.m (_initXContext): catch and process RandR event
  on default screen.
2020-01-26 02:55:34 +02:00
Sergii Stoian
7f24ad7d89 * Source/x11/XGServerWindow.m (_OSFrameToXFrame:for:): use
-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.
2020-01-24 19:43:09 +02:00
Sergii Stoian
64335397b5 * Headers/x11/XGServer.h (GSDisplayServer): RandR event and error base
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.
2020-01-23 19:03:34 +02:00
Sergii Stoian
501c6eb018 * Source/x11/XGServerWindow.m (boundsForScreen:): if Xrandr support
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.
2020-01-23 02:02:52 +02:00
Sergii Stoian
2085ea4a9a * configure.ac: check for availability of Xrandr library.
* config.h.in: added default value for Xrandr usage.
* configure: regenerate.
2020-01-22 12:58:17 +02:00
Marcus Müller
df63d305ac Fix ALPHA_THRESHOLD typo 2020-01-21 23:59:26 +01:00
Sergii Stoian
19a68d2d85 * Source/art/ftfont.m: removed commented out #include and #include
moved into ftfont.h.
2020-01-19 01:31:21 +02:00
Sergii Stoian
2657c4437c * Source/art/shfill.m:,
* 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.
2020-01-17 17:23:07 +02:00
Sergii Stoian
a890577b76
Merge pull request #15 from trunkmaster/master
TakeFocus request handling fix
2020-01-16 19:52:23 +02:00
Sergii Stoian
9cc708e9e8 * Source/x11/XGServerEvent.m (_handleTakeFocusAtom:forContext:): key_window
definition moved to the `if` block where it's used.
2020-01-16 19:47:48 +02:00
Sergii Stoian
a1f08ad8ca * Source/x11/XGServerEvent.m (_handleTakeFocusAtom:forContext:): tiny
formatting fix.
2020-01-16 11:44:28 +02:00
Sergii Stoian
4e5f2ddbb1 * Source/x11/XGServerEvent.m (_handleTakeFocusAtom:forContext:): use
`cWin` instead of `this_window`
* ChangeLog: updated.
2020-01-16 11:41:02 +02:00
Sergii Stoian
124a18f026 * Source/x11/XGServerEvent.m (_handleTakeFocusAtom:forContext:):
- 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.
2020-01-16 00:54:34 +02:00
Sergii Stoian
09bf6067c2
Merge pull request #14 from trunkmaster/master
Correct application icon images in WM
2020-01-14 10:55:29 +02:00
Sergii Stoian
d1dd3f0f5c * Source/x11/XGServerWindow.m (ALPHA_THRESHOLD): removed duplicate of
definition.
2020-01-14 10:52:59 +02:00
Sergii Stoian
9e298b2142 * Source/x11/XGServerWindow.m (alphaMaskForImage):
(imagecursor:::): renamed missed image_mask() call.
2020-01-14 02:05:07 +02:00
Sergii Stoian
f9a9d6679b * Source/x11/XGServerWindow.m (alphaMaskForImage): renamed from
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.
2020-01-14 01:58:30 +02:00
Sergii Stoian
528660834c * Source/x11/XGServerWindow.m (_createNetIcon:result:size:): fixed
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().
2020-01-13 01:34:11 +02:00
fredkiefer
de86246567 * Source/cairo/CairoFontInfo.m: Revert to the old defaults for
hinting and allow for all possible values to be set.
2019-12-24 14:10:02 +01:00
Fred Kiefer
f409903fb4
Merge pull request #12 from gnustep/ivucica-codeowners-1
Add CODEOWNERS.
2019-11-04 09:08:11 +01:00
Ivan Vučica
3acbb83ef1
Add CODEOWNERS. 2019-11-03 22:54:07 +00:00
Gregory John Casamento
c6919519c6 Update version 2019-09-13 23:35:48 -04:00
fredkiefer
36283735ab * Source/cairo/CairoFontInfo.m,
* Source/fontconfig/FCFontEnumerator.m: Small cleanup of last pull
request.
2019-05-19 22:56:48 +02:00
fredkiefer
5362c305bc Add ChangeLog to merged pull request. 2019-05-19 21:13:29 +02:00
Fred Kiefer
8691c48537
Merge pull request #5 from Deek/deek
Font system revamp
2019-05-19 18:06:46 +02:00
Fred Kiefer
d2d0e6650a
Merge pull request #11 from trunkmaster/master
Mouse cursor images handling fix and cleanup
2019-05-01 14:15:14 +02:00
Gregory John Casamento
d5f2097261 Add changes to address 16 bit support in Xlib. Need to test 2019-04-20 11:17:57 -04:00
Sergii Stoian
00a1180684 * Source/x11/XGServerWindow.m (standardcursor::): Getting of
XC_fleur as GSCloseHandCursor was removed because it loads in
NSCursor as image.
2019-04-20 02:01:40 +03:00
Sergii Stoian
39e2e16bec * Source/x11/XGServerWindow.m (standardcursor::): revert resizing
cursor names to the old values upon request of project owner.
2019-04-18 01:22:57 +03:00
Sergii Stoian
d4a4888b9d * Source/x11/XGServerWindow.m (getStandardBitmap): send bitmapFormat
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.
2019-04-17 18:06:19 +03:00
Fred Kiefer
9f750d2c4f
Merge pull request #10 from trunkmaster/master
Support for configurable mouse properties
2019-04-12 16:11:18 +02:00
Sergii Stoian
b5003272a7 * Source/x11/XGServerEvent.m (mouseOptionsChanged:): change double-click
minimum value to 200 and default to 300.
2019-04-12 15:45:39 +03:00
Sergii Stoian
59b1f51e5f * Source/x11/XGServerEvent.m (processEvent:): do not send event if
disabled menu mouse button was released.
2019-04-11 13:15:09 +03:00
Sergii Stoian
7981c3e41c * Source/x11/XGServerEvent.m (initializeMouse): new method. Calls -mouseOptionsChanged:
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.
2019-04-11 01:50:30 +03:00
Fred Kiefer
6f69fdcc2f
Merge pull request #9 from trunkmaster/master
Added support for WindowMaker's WMFHideApplication action.
2019-04-06 23:32:22 +02:00
Sergii Stoian
2f4c96f9d1 hidewindow method was renamed to hideApplication. 2019-04-06 22:32:29 +03:00
Sergii Stoian
b492ac87cd Added support for WindowMaker's WMFHideApplication action. 2019-04-05 14:46:05 +03:00
Fred Kiefer
ba2d592083
Merge pull request #8 from trunkmaster/master
Send double-click on appicon to WindowMaker
2019-04-04 16:41:11 +02:00
Sergii Stoian
f9958176db Do not send NSEvent only for single-click on appicon and minindow in WindowMaker environment. 2019-04-04 12:10:47 +03:00
Sergii Stoian
21f38f8060 Send double-click on appicon to the WindowMaker. Old code sent to WM only single-click. 2019-04-04 01:22:25 +03:00