Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
6a1d15a4
Commit
6a1d15a4
authored
Jun 09, 2003
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* drag & drop works with gnome file manager now
parent
3ee236eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
12 deletions
+26
-12
modules/gui/skins/x11/x11_dragdrop.cpp
modules/gui/skins/x11/x11_dragdrop.cpp
+26
-12
No files found.
modules/gui/skins/x11/x11_dragdrop.cpp
View file @
6a1d15a4
...
...
@@ -2,7 +2,7 @@
* x11_dragdrop.cpp: X11 implementation of the drag & drop
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: x11_dragdrop.cpp,v 1.
3 2003/06/09 00:07:09
asmax Exp $
* $Id: x11_dragdrop.cpp,v 1.
4 2003/06/09 00:32:58
asmax Exp $
*
* Authors: Cyril Deguet <asmax@videolan.org>
*
...
...
@@ -171,21 +171,34 @@ void X11DropObject::DndDrop( ldata_t data )
XGetWindowProperty
(
display
,
src
,
propAtom
,
0
,
1024
,
False
,
AnyPropertyType
,
&
type
,
&
format
,
&
nitems
,
&
nbytes
,
(
unsigned
char
**
)
&
buffer
);
string
selection
=
buffer
;
string
selection
=
""
;
if
(
buffer
!=
NULL
)
{
selection
=
buffer
;
}
XFree
(
buffer
);
XUNLOCK
;
// Find the protocol, if any
string
::
size_type
pos
=
selection
.
find
(
":"
,
0
);
if
(
selection
.
find
(
"///"
,
pos
+
1
)
==
pos
+
1
)
if
(
selection
!=
""
)
{
selection
.
erase
(
pos
+
1
,
2
);
}
// TODO: multiple files handling
string
::
size_type
end
=
selection
.
find
(
"
\n
"
,
0
);
selection
=
selection
.
substr
(
0
,
end
-
1
);
end
=
selection
.
find
(
"
\r
"
,
0
);
selection
=
selection
.
substr
(
0
,
end
-
1
);
// Find the protocol, if any
string
::
size_type
pos
=
selection
.
find
(
":"
,
0
);
if
(
selection
.
find
(
"///"
,
pos
+
1
)
==
pos
+
1
)
{
selection
.
erase
(
pos
+
1
,
2
);
}
char
*
name
=
new
char
[
selection
.
size
()
+
1
];
strncpy
(
name
,
selection
.
c_str
(),
selection
.
size
()
+
1
);
msg_Dbg
(
p_intf
,
"drop: %s
\n
"
,
name
);
OSAPI_PostMessage
(
NULL
,
VLC_DROP
,
(
unsigned
int
)
name
,
0
);
char
*
name
=
new
char
[
selection
.
size
()
+
1
];
strncpy
(
name
,
selection
.
c_str
(),
selection
.
size
()
+
1
);
msg_Dbg
(
p_intf
,
"drop: %s
\n
"
,
name
);
OSAPI_PostMessage
(
NULL
,
VLC_DROP
,
(
unsigned
int
)
name
,
0
);
}
// Tell the source we accepted the drop
XEvent
event
;
...
...
@@ -201,4 +214,5 @@ void X11DropObject::DndDrop( ldata_t data )
XSendEvent
(
display
,
src
,
False
,
0
,
&
event
);
XUNLOCK
;
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment