Dropdown.c: full width, 40 % of the screen high, override-redirect, hidden until its key (resource dropdownKey, F12); then it slides down in 8 steps to below the top bar and takes the keyboard, the key sends it back up. The key is grabbed on the root window (with the CapsLock/NumLock combinations, a BadAccess is reported) and taken in dtterm's own event dispatcher (XtSetEventDispatcher): registering the root window with a widget did not bring it. Xsession.d/0085.dtdropdown starts it in every session. Tested on Xvfb with dtwm and dtbar: hidden at start, down on F12 below the bar with the keyboard (typed 'echo dropped down'), up again on F12. xdotool key F12 maps F12 to a spare keycode the grab never sees; the test sends an XTest event on F12's own keycode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
590 B
C
19 lines
590 B
C
/*
|
|
* Dropdown.h -- MCDE: the drop-down terminal (Dropdown.c)
|
|
*
|
|
* Copyright (c) 2026 The Makronix project. GNU LGPL 2.0 or later, as CDE.
|
|
*/
|
|
|
|
#ifndef _Dtterm_Dropdown_h
|
|
#define _Dtterm_Dropdown_h
|
|
|
|
#include <X11/Intrinsic.h>
|
|
|
|
/* before the shell is realized: override-redirect, the size, off screen */
|
|
extern void _McdeDropdownPrepare(Widget topShell);
|
|
/* after it is realized: grab KEY ("F12") on the root window; the window
|
|
* stays hidden until the key. 0 if the key cannot be had. */
|
|
extern int _McdeDropdownStart(Widget topShell, const char *key);
|
|
|
|
#endif /* _Dtterm_Dropdown_h */
|