---
name: "xosd_is_onscreen"
section: "3"
platform: "linux"
package: "xosd"
version: "2.2.14-12"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/xosd_is_onscreen"
---

# xosd\_is\_onscreen(3)

Returns wether the XOSD window is shown

## NAME

xosd\_is\_onscreen - Returns wether the XOSD window is shown

## SYNOPSIS

\#include \<xosd.h\>

xosd \***xosd\_is\_onscreen** (xosd *\*osd*);

## DESCRIPTION

**osd\_is\_onscreen** determines weather a XOSD window, is currently being shown (is mapped to the X display). Because XOSD displays data asynchronously (see [**xosd\_display**(3)](/xosd_display/3.md) for details) it can be difficult to know if data is being displayed, **xosd\_is\_onscreen** solves this problem.

Call [**xosd\_show**(3)](/xosd_show/3.md) or [**xosd\_hide**(3)](/xosd_hide/3.md) to alter the visibility of the XOSD window.

## ARGUMENTS

- *osd*

  The XOSD window to query.

## RETURN VALUE

A 1 is returned if the window is onscreen (mapped), or 0 if it is hidden (unmapped). On error, -1 is returned and *xosd\_error* is set to indicate the reason for the error.

## ENVIRONMENT

- *char \*xosd\_error*

  A string to a text string describing the error, if one occurred.

## HISTORY

The **xosd\_is\_onscreen** function first appeared in version 2.1 of the XOSD library.

## AUTHORS

The XOSD library was originally written by André Renaud and is currenly maintained by Tim Wright, who also wrote the **xosd\_is\_onscreen** function. Michael JasonSmith thinks he wrote this document, but is not sure; drop Micahel an email (\<mike@ldots.org\>) if you think he didn't write this document.

## BUGS

There are no known bugs with **xosd\_is\_onscreen**. Bug reports can be sent to \<xosd@ignavus.net\>.

## SEE ALSO

 [**xosd\_display**(3)](/xosd_display/3.md), [**xosd\_show**(3)](/xosd_show/3.md), [**xosd\_hide**(3)](/xosd_hide/3.md).
