mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-30 02:23:27 +01:00
Merge pull request #367 from landswellsong/osx-terminal-xtra-fix
Correctly operational from OSX terminals
This commit is contained in:
commit
88270827a9
@ -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