---
name: "XGrabServer"
section: "3"
platform: "linux"
package: "libx11"
version: "1.8.14-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://carta.tech/man/XGrabServer"
---

# XGrabServer(3)

grab the server

## NAME

XGrabServer, XUngrabServer - grab the server

## SYNTAX

int XGrabServer(Display \**display*);

int XUngrabServer(Display \**display*);

## ARGUMENTS

- *display*

  Specifies the connection to the X server.

## DESCRIPTION

The **XGrabServer** function disables processing of requests and close downs on all other connections than the one this request arrived on. You should not grab the X server any more than is absolutely necessary.

The **XUngrabServer** function restarts processing of requests and close downs on other connections. You should avoid grabbing the X server as much as possible.

## SEE ALSO

[**XGrabButton**(3)](/man/XGrabButton/3.md), [**XGrabKey**(3)](/man/XGrabKey/3.md), [**XGrabKeyboard**(3)](/man/XGrabKeyboard/3.md), [**XGrabPointer**(3)](/man/XGrabPointer/3.md)\
 *Xlib - C Language X Interface*
