Commit Graph

13 Commits

Author SHA1 Message Date
Adrian Chadd
1f685e250a Revert "Merge pull request #34 from phillbush/localize-2"
This reverts commit b9e7c7313d, reversing
changes made to 774f98ef87.

It broke ToolItem input; will need to dig into this a bit more.
2026-02-28 12:16:16 -08:00
Lucas de Sena
599f0a17b3 localize menu routines
Keep state loal into drag_menu() in menu.c, rather than in global
variables around menu.c and main.c
2026-02-24 00:25:46 +00:00
Lucas de Sena
7baebf1316 client.c: fix missing member on c->scr 2026-02-23 01:35:12 +00:00
Adrian Chadd
a79992cb7b Merge pull request #31 from phillbush/atoms
Clean up how XAtoms are handled
2026-02-22 10:36:16 -08:00
Lucas de Sena
beccf8b0fb do not reparent client window; fix amiwm#29
reparenting the client's window creates a few issues:
• We get bogus UnmapNotify and MapNotify events that are ultimately
  generated by amiwm itself.
• We do not get button events from the window, since its frame
  (c->parent) that we have called XGrabButtons(3) onto, is not
  its parent anymore.

To fix this, do not reparent the client window, but its frame window.
And keep the client window always inside the frame.
2026-02-19 20:46:57 +00:00
Lucas de Sena
ca04f20fec implement a table of atoms defined only once
Previously, adding a new atom into the code required:
1. In <icc.h>, add the line `extern Atom my_new_atom;` declaring the new atom.
2. In <icc.c>, add the line `Atom my_new_atom;` defining the new atom.
3. In <icc.c>, add the line `my_new_atom = XInternAtom(dpy, "MY_NEW_ATOM", False);`
   interning this new atom, and assigning the interned value to the variable.

Now, just add a line with the atom's name in the X-MACRO in <icc.h>, and
a XInternAtoms(3) and a set of macros will do the rest.

All new atoms will be referred to as an entry in the ATOMS[] array.
For example:

	ATOMS[MY_NEW_ATOM]

The exception are for those REALLY OLD atoms that have already a
dedicated compile-time-known value defined at <X11/Xatom.h>.  Those
do not need to be interned; and are referred to with a constant
beginning with the `XA_` prefix.  For example:

	XA_WM_CLASS
2026-02-19 20:22:50 +00:00
Lucas de Sena
6685043266 make dialog clients be iconified/re-screened with their respective leader client 2026-02-04 16:12:48 +00:00
Adrian Chadd
def62797f9 [amiwm] Update to 0.22pl2
This notably includes full screen support!

Addresses Issue #12
2023-12-21 22:09:25 -08:00
Adrian Chadd
631176c9a2 [amiwm] Implement a keyboard shortcut to move a client to a different screen
This allows a keyboard shortcut to move a client to a different amiwm
screen.  That way when you have things like Firefox restart every window
in a single screen, you can quickly move screens to where they should be.
2022-09-05 16:06:18 -07:00
Adrian Chadd
d00be9ffa8 [amiwm] remove the global 'front' variable
This is a pretty straight forward change to remove the global front
variable and instead use a couple of accessor functions.

This hopefully will make it easier to keep track and debug when
the front screen changes.
2022-04-03 08:20:39 -07:00
Adrian Chadd
26cecc8487 [amiwm] Use XAllocSizeHints() for the sizehints in struct Client
Although it likely doesn't matter /that/ much, the x11 xlib manual
does say to use it rather than expecting the struct to stay the same
size.

Yeah yeah it's 2022 and we really do build things from source,
ICCCM is likely not going to change that much nowdays, etc, etc.
2022-03-12 21:04:24 -08:00
Adrian Chadd
294256771a [amiwm] Fix logic for the window size when maximized.
This is from Marcus' bzr repository (rev 126).
2022-02-13 18:56:38 -08:00
reddsik
c85716f60e Initial commit! 2017-03-26 13:00:19 +02:00