Skip to content

Commit 7d86c17

Browse files
committed
[osx] Fix compilation error on DnD impl when CLIP_ENABLE_IMAGE is not defined
1 parent 0903934 commit 7d86c17

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

os/osx/dnd.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// LAF OS Library
2-
// Copyright (C) 2024 Igara Studio S.A.
2+
// Copyright (C) 2024-2025 Igara Studio S.A.
33
//
44
// This file is released under the terms of the MIT license.
55
// Read LICENSE.txt for more information.
@@ -26,9 +26,9 @@ class DragDataProviderOSX : public DragDataProvider {
2626
NSPasteboard* m_pasteboard;
2727

2828
base::paths getPaths() override;
29-
29+
#if CLIP_ENABLE_IMAGE
3030
SurfaceRef getImage() override;
31-
31+
#endif
3232
std::string getUrl() override;
3333

3434
bool contains(DragDataItemType type) override;

os/osx/dnd.mm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// LAF OS Library
2-
// Copyright (C) 2024 Igara Studio S.A.
2+
// Copyright (C) 2024-2025 Igara Studio S.A.
33
//
44
// This file is released under the terms of the MIT license.
55
// Read LICENSE.txt for more information.
@@ -35,6 +35,8 @@
3535
return files;
3636
}
3737

38+
#if CLIP_ENABLE_IMAGE
39+
3840
SurfaceRef DragDataProviderOSX::getImage()
3941
{
4042
clip::image img;
@@ -45,6 +47,8 @@
4547
return os::instance()->makeSurface(img);
4648
}
4749

50+
#endif // CLIP_ENABLE_IMAGE
51+
4852
std::string DragDataProviderOSX::getUrl()
4953
{
5054
NSURL* url = [NSURL URLFromPasteboard:m_pasteboard];

0 commit comments

Comments
 (0)