mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 01:23:03 +01:00
Correctly operational from OSX terminals
This commit is contained in:
parent
b24c5d8cf8
commit
aade65bfe1
@ -271,6 +271,11 @@ int init_xtra(drop_callback d)
|
|||||||
|
|
||||||
Xtra.terminal_window = focused_window_id();
|
Xtra.terminal_window = focused_window_id();
|
||||||
|
|
||||||
|
/* OSX: if focused window is 0, it means toxic is ran from
|
||||||
|
* native terminal and not X11 terminal window, silently exit */
|
||||||
|
if (!Xtra.terminal_window)
|
||||||
|
return 0;
|
||||||
|
|
||||||
{
|
{
|
||||||
/* Create an invisible window which will act as proxy for the DnD operation. */
|
/* Create an invisible window which will act as proxy for the DnD operation. */
|
||||||
XSetWindowAttributes attr = {0};
|
XSetWindowAttributes attr = {0};
|
||||||
@ -343,7 +348,7 @@ int init_xtra(drop_callback d)
|
|||||||
|
|
||||||
void terminate_xtra()
|
void terminate_xtra()
|
||||||
{
|
{
|
||||||
if (!Xtra.display) return;
|
if (!Xtra.display || !Xtra.terminal_window) return;
|
||||||
|
|
||||||
XEvent terminate = {
|
XEvent terminate = {
|
||||||
.xclient = {
|
.xclient = {
|
||||||
|
Loading…
Reference in New Issue
Block a user