aboutsummaryrefslogtreecommitdiff
path: root/src/Ewmh.cc
AgeCommit message (Collapse)AuthorFilesLines
2022-04-18Fix encoding of _NET_DESKTOP_NAMESMathias Gumz1-7/+13
This commit fixes the encoding of _NET_DESKTOP_NAMES to match the specification[1]: … The names of all virtual desktops. This is a list of NULL-terminated strings in UTF-8 encoding … We use Xutf8TextListToTextProperty to transform a list of strings (NULL-terminated) into one XTextProperty which is lacking the last NULL-Termination … at least that is what observation tells us and what is written in the documentation of that function[2]: … A final terminating null byte is stored at the end of the value field of text_prop_return but is not included in the nitems member. As a result, the way *fluxbox* is storing desktop names and the way other WMs are storing them and how other tools like pagers etc are expecting the content to be formated is slightly off. This commit addresses that issue by adding one more "artificial" desktop name and thus producing the desired content for _NET_DESKTOP_NAMES. [1]: https://specifications.freedesktop.org/wm-spec/wm-spec-1.4.html#idm46439038971488 [2]: https://www.x.org/releases/X11R7.5/doc/man/man3/Xutf8TextListToTextProperty.3.html
2016-06-26remove strut when property is withdrawnThomas Lübking1-0/+2
CCBUG: 1133
2015-01-29Simpler code to set _NET_DESKTOP_NAMESMathias Gumz1-9/+3
gcc-4.2.1 on OpenBSD-5.6 hinted that strcpy() is not the safest function on earth. While seeing the code I wondered why it we first create copies of the names at all (let alone using memset() and then strcpy() after it).
2015-01-22CosmeticMathias Gumz1-12/+2
2014-07-22fix _NET_MOVERESIZE_WINDOW resize issue (#1108)Mathias Gumz1-6/+6
handing over the dimensions of a WinClient client must not contain properties of the FbWinFrame, otherwise they get added twice in FbWinFrame::moveResizeForClient() and thus result in a resizes when no resize is wanted. other changes: it's easier for me to detect the nth bit when the value looks like (1 << 8) instead of 0x0100 (for the 8th bit). that is why i changed 0x0100, 0x0200 etc. in the nearby code.
2011-08-11Use _NET_WM_ICON from 32bit apps (xfce4-terminal) correctlyMathias Gumz1-3/+13
The icons coming from _NET_WM_ICON are argb32. fluxbox uses such icons in entities such as 'clientmenu', 'iconbar', 'titlebar'. These entities are not related to the depth of the winclient but to fluxbox's default depth. Using 'winclient.depth()' is a mistake, since fluxbox is unable to copy pixmaps from 32bit to 24/16/15bit. It is not necessary either, because fluxbox should extract the argb32 icon data directly into the pixmap with the correct depth in the first place. This fixes (reopened) bug #1852693. Note: The whole icon code in fluxbox is quite messy, lots of copying and scaling. It might be simpler and fater to just extract the icon when needed , in just the size that is needed.
2011-05-08Can check CARDINAL properties in CLIENT PATTERNSnacitar sevaht1-12/+3
Introduces a new member function, FbWindow::cardinalProperty() This change also changes other code that previously used FbWindow::property() to do the same thing as the new function; this reduces code duplication. There are still some bits of code (Ewmh.cc, extractNetWmIcon()) that use FbWindow::property() to retrieve XA_CARDINAL values, but as the new method is designed for getting a _single_ property, and that code uses FbWindow::property() to retrieve the number of values present, and then grab all of them; it's a different use case. I opted to not try to make cardinalProperty() into some monolithic all-purpose cardinal method; FbWindow::property() works just fine for that. This change also adds an optional (default=NULL) boolean to FbWindow::textProperty and friends that allows the caller to determine whether or not a value was actually retrieved. This was necessary for integrating FbWindow::cardinalProperty with the codebase, and it seemed to fit with FbWindow::textProperty as well. Prior to this change, if you got a return value of "", you wouldn't know if you successfully retrieved the value which happened to be blank, or if you failed to retrieve the value. Now, you can pass the address of a boolean if you so choose in order to differentiate these situations; the same applies to the new FbWindow::cardinalProperty().
2011-03-23compile fix: sunCC 5.11 (sunstudio 12) compiles and links againMathias Gumz1-14/+14
biggest change: renaming of 'class Layer' to 'class ResourceLayer' in Layer.hh to handle complaints about 'ambiguous Layer: Layer or FbTk::Layer'. 'ResourceLayer' sounds crappy, but that was the best I could come up with right now.
2011-02-23renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItemMathias Gumz1-4/+4
2010-09-13code simplificationMathias Gumz1-0/+1
we do not need a std::map just to store an attribute on an AtomHandler, it makes housekeeping just more annoying.
2010-09-08introduced FbTk::BidiStringMathias Gumz1-4/+5
a 'BidiString' holds both the logical content and the visual reordered version of the content of a string. this helps to reduce the number of calls to reorder the string before drawing it (as introduced in the patch from Ken Bloom) and to be more consistent in menus and textboxes (drawing cursors and underlining text).
2010-09-08removed redundant if-statementMathias Gumz1-7/+5
2010-04-30bugfix: using 'int' on 64bit systems while setting window properties is wrongMathias Gumz1-1/+1
using a smaller type ('long' on 64bit is 8 byte, 'int' is 4) results in strange properties, eg: _NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_HORZ, undefined atom # 0x2726130 (when xpropping a maximized xterm). this might cause misbehavior in apps.
2010-03-26Changed title signal in Focusable to new signal systemHenrik Kinnunen1-4/+4
2010-03-18Changed Focusable::focusSig() to new signal system.Henrik Kinnunen1-2/+1
The focus signal emits the window that had the focus status changed.
2010-03-17Changed #ifdef DEBUG ... cerr << to using fbdbg.Henrik Kinnunen1-19/+18
This will reduce the number of #ifdef DEBUG for simple debug messages. include "Debug.hh" and use fbdbg instead of cerr for debug.
2009-10-01compile fix: missing headers (sun compiler complained about)Mathias Gumz1-0/+9
2009-09-30compile fix: ISO C++ forbids variable length array 'names'Mathias Gumz1-3/+5
2009-09-30cosmetic fixes: removed redundant ';' + some whitespacesMathias Gumz1-1/+2
2008-10-01fix restackingMark Tiefenbruck1-1/+1
2008-09-23fixed detection of bad values in the _NET_WM_ICON property. eg, tvtime.sf.netMathias Gumz1-14/+58
is not aware of how to correctly feed icon data into the property on 64bit architecture which caused the dimensions of the icon beeing corrupt and due to overflow arithmetics fluxbox crashed.
2008-09-11be aware of badly specified _NET_WM_ICONSMathias Gumz1-4/+17
2008-08-27move some things from FluxboxWindow to WindowStateMark Tiefenbruck1-8/+8
2008-08-22apply patch to fix memory leak that shouldn't existMark Tiefenbruck1-0/+2
2008-08-18combined code for saved window positions and MoveTo key commandMark Tiefenbruck1-1/+1
added left, right, top, and bottom center reference points
2008-08-16some cleanupMark Tiefenbruck1-1/+1
2008-08-15cosmetic api changeMathias Gumz1-1/+1
2008-06-07fix some memory leaks and uninitialized valuesMatthias S. Benkmann1-2/+2
2008-05-21c++ != perlMark Tiefenbruck1-2/+2
2008-05-16minor changes for frame extent calculationsMark Tiefenbruck1-2/+2
2008-03-05transform _NET_WM_ICON data to correct depthMathias Gumz1-11/+38
2008-02-24use _NET_WM_ICON property as resource for icons, fixed partly #1852693Mathias Gumz1-1/+154
instead of depending on proper icons in the old icccm wmhints, fluxbox now tries to get the icon data stored in _NET_WM_ICON
2008-01-07switch FbWinFrameTheme to use FocusableThemeMark Tiefenbruck1-2/+2
2008-01-05update code to use ThemeProxyMark Tiefenbruck1-5/+5
2008-01-04remove old svn $Id$ tagsMark Tiefenbruck1-2/+0
2008-01-03mergedMathias Gumz1-11/+13
2008-01-02more encapsulation for EwmhMathias Gumz1-227/+313
2008-01-02make reported frame extents include border widthMark Tiefenbruck1-11/+13
2007-12-30remove some (hopefully) unneeded header includesMark Tiefenbruck1-0/+1
2007-12-23added focused/unfocused borders to stylesMark Tiefenbruck1-2/+2
2007-12-22make better decisions about when to allow stealing the focusMark Tiefenbruck1-1/+1
2007-11-12allow arbitrary window patterns in iconbarmarkt1-1/+2
2007-11-05various refactoring and minor changesmarkt1-88/+38
2007-10-24fix _NET_CLIENT_LIST updating on window closemarkt1-1/+0
2007-10-23allow remembering minimized, maximized, and fullscreen statemarkt1-6/+4
2007-10-13merged changes from pre-develmarkt1-50/+23
2007-09-13move dock windows to DOCK layer and remove decorationsmarkt1-0/+2
2007-08-05some minor changesmarkt1-1/+1
2007-08-05revert accidental change, sorry marksimonb1-1/+1
2007-08-04Fix system tray restart issuessimonb1-1/+1