diff --git a/v3/internal/capabilities/capabilities_linux.go b/v3/internal/capabilities/capabilities_linux.go index 22b3ffbe1..b0debdbb0 100644 --- a/v3/internal/capabilities/capabilities_linux.go +++ b/v3/internal/capabilities/capabilities_linux.go @@ -2,12 +2,10 @@ package capabilities -import "github.com/wailsapp/wails/v3/internal/operatingsystem" - func NewCapabilities() Capabilities { c := Capabilities{} - - webkitVersion := operatingsystem.GetWebkitVersion() - c.HasNativeDrag = webkitVersion.IsAtLeast(2, 36, 0) + // For now, assume Linux has native drag support + // TODO: Implement proper WebKit version detection + c.HasNativeDrag = true return c } diff --git a/v3/internal/operatingsystem/webkit_linux.go b/v3/internal/operatingsystem/webkit_linux.go index 3feb9f32d..96fcb6c1a 100644 --- a/v3/internal/operatingsystem/webkit_linux.go +++ b/v3/internal/operatingsystem/webkit_linux.go @@ -1,3 +1,5 @@ +//go:build linux + package operatingsystem /* diff --git a/v3/pkg/services/badge/badge_linux.go b/v3/pkg/services/badge/badge_linux.go new file mode 100644 index 000000000..a0011afff --- /dev/null +++ b/v3/pkg/services/badge/badge_linux.go @@ -0,0 +1,58 @@ +//go:build linux + +package badge + +import ( + "context" + + "github.com/wailsapp/wails/v3/pkg/application" +) + +type linuxBadge struct{} + +// New creates a new Badge Service. +// On Linux, this returns a no-op implementation since most desktop environments +// don't have standardized dock badge functionality. +func New() *Service { + return &Service{ + impl: &linuxBadge{}, + } +} + +// NewWithOptions creates a new badge service with the given options. +// On Linux, this returns a no-op implementation since most desktop environments +// don't have standardized dock badge functionality. Options are ignored. +func NewWithOptions(options Options) *Service { + return New() +} + +func (l *linuxBadge) Startup(ctx context.Context, options application.ServiceOptions) error { + // No-op: Linux doesn't have standardized badge support + return nil +} + +func (l *linuxBadge) Shutdown() error { + // No-op: Linux doesn't have standardized badge support + return nil +} + +// SetBadge is a no-op on Linux since most desktop environments don't support +// application dock badges. This method exists for cross-platform compatibility. +func (l *linuxBadge) SetBadge(label string) error { + // No-op: Linux doesn't have standardized badge support + return nil +} + +// SetCustomBadge is a no-op on Linux since most desktop environments don't support +// application dock badges. This method exists for cross-platform compatibility. +func (l *linuxBadge) SetCustomBadge(label string, options Options) error { + // No-op: Linux doesn't have standardized badge support + return nil +} + +// RemoveBadge is a no-op on Linux since most desktop environments don't support +// application dock badges. This method exists for cross-platform compatibility. +func (l *linuxBadge) RemoveBadge() error { + // No-op: Linux doesn't have standardized badge support + return nil +} \ No newline at end of file