Commit graph

151 commits

Author SHA1 Message Date
Mathias Gumz
1da473bab9 Use _NET_WM_ICON from 32bit apps (xfce4-terminal) correctly
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-08-11 09:48:08 +02:00
nacitar sevaht
1dacf57d20 Can check CARDINAL properties in CLIENT PATTERNS
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-05-08 07:48:03 +02:00
Mathias Gumz
e850b01919 compile fix: sunCC 5.11 (sunstudio 12) compiles and links again
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-03-23 12:02:15 +01:00
Mathias Gumz
9616a676d8 renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItem 2011-02-23 22:49:27 +01:00
Mathias Gumz
deb6a1ebf4 code simplification
we do not need a std::map just to store an attribute on an AtomHandler,
it makes housekeeping just more annoying.
2010-09-13 22:04:24 +02:00
Mathias Gumz
690d926ac4 introduced FbTk::BidiString
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-08 20:17:21 +02:00
Mathias Gumz
1e8fe2bc14 removed redundant if-statement 2010-09-08 11:19:49 +02:00
Mathias Gumz
583398e491 bugfix: using 'int' on 64bit systems while setting window properties is wrong
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-04-30 09:03:57 +02:00
Henrik Kinnunen
dd8fcc8b7b Changed title signal in Focusable to new signal system 2010-03-26 18:15:45 +01:00
Henrik Kinnunen
6ed8369d57 Changed Focusable::focusSig() to new signal system.
The focus signal emits the window that had the focus status changed.
2010-03-18 19:41:35 +01:00
Henrik Kinnunen
ce0b41c847 Changed #ifdef DEBUG ... cerr << to using fbdbg.
This will reduce the number of #ifdef DEBUG for
simple debug messages.
include "Debug.hh" and use fbdbg instead of cerr for debug.
2010-03-17 16:35:07 +01:00
Mathias Gumz
078438e993 compile fix: missing headers (sun compiler complained about) 2009-10-01 08:41:04 +02:00
Mathias Gumz
9cd953b2e1 compile fix: ISO C++ forbids variable length array 'names' 2009-09-30 21:05:42 +02:00
Mathias Gumz
884db973bb cosmetic fixes: removed redundant ';' + some whitespaces 2009-09-30 21:02:24 +02:00
Mark Tiefenbruck
9df75ed7a6 fix restacking 2008-10-01 02:29:59 -07:00
Mathias Gumz
acd690ff65 fixed detection of bad values in the _NET_WM_ICON property. eg, tvtime.sf.net
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-23 09:13:53 +02:00
Mathias Gumz
8d0fb85bbc be aware of badly specified _NET_WM_ICONS 2008-09-11 16:21:51 +02:00
Mark Tiefenbruck
82047e6a39 move some things from FluxboxWindow to WindowState 2008-08-27 18:29:33 -04:00
Mark Tiefenbruck
2f3a48f17f apply patch to fix memory leak that shouldn't exist 2008-08-22 02:23:29 -07:00
Mark Tiefenbruck
37b18a9694 combined code for saved window positions and MoveTo key command
added left, right, top, and bottom center reference points
2008-08-18 05:12:30 -07:00
Mark Tiefenbruck
38654bae45 some cleanup 2008-08-16 05:54:07 -07:00
Mathias Gumz
1d8dfcdf9a cosmetic api change 2008-08-15 19:38:41 +02:00
Matthias S. Benkmann
6509fe0cac fix some memory leaks and uninitialized values 2008-06-07 06:14:23 -07:00
Mark Tiefenbruck
5ecb192a9c c++ != perl 2008-05-20 23:30:23 -07:00
Mark Tiefenbruck
2815393751 minor changes for frame extent calculations 2008-05-15 18:48:35 -07:00
Mathias Gumz
1b1262e01b transform _NET_WM_ICON data to correct depth 2008-03-05 09:24:40 +01:00
Mathias Gumz
46fdf4d1b4 use _NET_WM_ICON property as resource for icons, fixed partly #1852693
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-02-24 21:58:24 +01:00
Mark Tiefenbruck
ec3125aeb9 switch FbWinFrameTheme to use FocusableTheme 2008-01-07 12:08:56 -08:00
Mark Tiefenbruck
ac1bd7e098 update code to use ThemeProxy 2008-01-04 17:39:19 -08:00
Mark Tiefenbruck
9c105111d2 remove old svn $Id$ tags 2008-01-03 17:34:12 -08:00
Mathias Gumz
bf15250292 merged 2008-01-03 07:56:59 +01:00
Mathias Gumz
d24e2aae6e more encapsulation for Ewmh 2008-01-02 22:41:50 +01:00
Mark Tiefenbruck
2f9f29df22 make reported frame extents include border width 2008-01-01 17:32:10 -08:00
Mark Tiefenbruck
4cc810b0d3 remove some (hopefully) unneeded header includes 2007-12-29 22:44:11 -08:00
Mark Tiefenbruck
fbc305ca80 added focused/unfocused borders to styles 2007-12-23 13:33:10 -08:00
Mark Tiefenbruck
0a67bdce41 make better decisions about when to allow stealing the focus 2007-12-21 21:24:13 -08:00
markt
5d7043320d allow arbitrary window patterns in iconbar 2007-11-12 21:59:43 +00:00
markt
97f7c3e1b5 various refactoring and minor changes 2007-11-05 17:05:58 +00:00
markt
2ef6a7af44 fix _NET_CLIENT_LIST updating on window close 2007-10-24 17:41:26 +00:00
markt
1c05af4329 allow remembering minimized, maximized, and fullscreen state 2007-10-23 17:34:30 +00:00
markt
a59428d67a merged changes from pre-devel 2007-10-13 21:51:37 +00:00
markt
d5aa50bee6 move dock windows to DOCK layer and remove decorations 2007-09-13 22:11:12 +00:00
markt
538e33fedb some minor changes 2007-08-05 22:28:11 +00:00
simonb
1b65ec583f revert accidental change, sorry mark 2007-08-05 01:20:20 +00:00
simonb
b273360331 Fix system tray restart issues 2007-08-04 17:14:13 +00:00
markt
8da54ca0eb add some decorations to torn menus, and fix restart without an argument 2007-07-31 23:16:05 +00:00
markt
857a6d0a6a remove _NET_WM_DESKTOP, _NET_WM_STATE, and Gnome hints on client close 2007-07-08 22:49:12 +00:00
markt
7783a8c84e more fixes for _NET_WM_STATE_MODAL and _NET_WM_STATE_DEMANDS_ATTENTION 2007-07-01 17:59:57 +00:00
markt
0f9f193444 fixed implementation of _NET_WM_STATE_MODAL 2007-06-30 16:54:05 +00:00
markt
8fbeaf279e little hack for fixing _NET_WM_STATE_DEMANDS_ATTENTION with tabs 2007-06-30 01:28:54 +00:00