Skip to content

Commit

Permalink
remove support for very old GUI versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rmottola committed Jun 25, 2024
1 parent fc568a3 commit c361b0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 29 deletions.
12 changes: 1 addition & 11 deletions FSNode/FSNIconsView.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,9 @@
DockStyleModern = 1
} DockStyle;

#define SUPPORTS_XOR ((GNUSTEP_GUI_MAJOR_VERSION > 0) \
|| (GNUSTEP_GUI_MAJOR_VERSION == 0 \
&& GNUSTEP_GUI_MINOR_VERSION > 22) \
|| (GNUSTEP_GUI_MAJOR_VERSION == 0 \
&& GNUSTEP_GUI_MINOR_VERSION == 22 \
&& GNUSTEP_GUI_SUBMINOR_VERSION > 0))

static void GWHighlightFrameRect(NSRect aRect)
{
#if SUPPORTS_XOR
NSFrameRectWithWidthUsingOperation(aRect, 1.0, GSCompositeHighlight);
#endif
}


Expand Down Expand Up @@ -595,7 +586,6 @@ - (void)mouseDragged:(NSEvent *)theEvent

// Erase the previous rect
if (transparentSelection
|| !SUPPORTS_XOR
|| (!transparentSelection && scrolled))
{
[self setNeedsDisplayInRect: oldRect];
Expand All @@ -605,7 +595,7 @@ - (void)mouseDragged:(NSEvent *)theEvent
// Draw the new rect
[self lockFocus];

if (transparentSelection || !SUPPORTS_XOR)
if (transparentSelection)
{
[[NSColor darkGrayColor] set];
NSFrameRect(r);
Expand Down
22 changes: 4 additions & 18 deletions GWorkspace/Desktop/GWDesktopView.m
Original file line number Diff line number Diff line change
Expand Up @@ -839,18 +839,9 @@ - (void)mouseDown:(NSEvent *)theEvent
}
}

#define SUPPORTS_XOR ((GNUSTEP_GUI_MAJOR_VERSION > 0) \
|| (GNUSTEP_GUI_MAJOR_VERSION == 0 \
&& GNUSTEP_GUI_MINOR_VERSION > 22) \
|| (GNUSTEP_GUI_MAJOR_VERSION == 0 \
&& GNUSTEP_GUI_MINOR_VERSION == 22 \
&& GNUSTEP_GUI_SUBMINOR_VERSION > 0))

static void GWHighlightFrameRect(NSRect aRect)
{
#if SUPPORTS_XOR
NSFrameRectWithWidthUsingOperation(aRect, 1.0, GSCompositeHighlight);
#endif
}

- (void)mouseDragged:(NSEvent *)theEvent
Expand Down Expand Up @@ -895,8 +886,7 @@ - (void)mouseDragged:(NSEvent *)theEvent


// Erase the previous rect

if (transparentSelection || !SUPPORTS_XOR)
if (transparentSelection)
{
[self setNeedsDisplayInRect: oldRect];
[[self window] displayIfNeeded];
Expand All @@ -907,16 +897,12 @@ - (void)mouseDragged:(NSEvent *)theEvent
}

// Draw the new rect

if (transparentSelection || !SUPPORTS_XOR)
if (transparentSelection)
{
[[NSColor darkGrayColor] set];
NSFrameRect(r);
if (transparentSelection)
{
[[[NSColor darkGrayColor] colorWithAlphaComponent: 0.33] set];
NSRectFillUsingOperation(r, NSCompositeSourceOver);
}
[[[NSColor darkGrayColor] colorWithAlphaComponent: 0.33] set];
NSRectFillUsingOperation(r, NSCompositeSourceOver);
}
else
{
Expand Down

0 comments on commit c361b0e

Please sign in to comment.