Julien Danjou
fa47024714
Change colors infrastructure to style: rename colors_ctx_t to style_t and add font in it
2008-03-23 15:52:18 +01:00
Julien Danjou
0a980095b3
Rework colors stuff, add a common colors_ctx_t containing colors and shadow options
2008-03-23 15:52:17 +01:00
Julien Danjou
355b7d67b3
Change screen_get_bycoord() proto to take ScreensInfo as arg, and speed up things
2008-03-23 15:52:17 +01:00
Julien Danjou
f3652aaca6
Add a pointer to SLIST struct to store previous element
...
This will make back cycling faster
2008-03-23 15:52:17 +01:00
marco candrian
4ff0dae17e
trailing whitespaces removed
...
like:
find . -iname "*.txt" -o -iname "*.c" -o -iname "*.h" | xargs sed -i 's/\s\+$//'
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-02-13 09:05:10 +01:00
Julien Danjou
0bfa880b0f
add align option to widget to specify their alignment
2008-02-08 10:59:55 +01:00
Julien Danjou
a28876b5ce
reuse cairo context stuff
2008-01-31 18:18:15 +01:00
Julien Danjou
606d157e31
rename some screens function
2008-01-30 09:36:52 +01:00
Julien Danjou
ab8d95f13d
rework include
2008-01-29 11:27:14 +01:00
Julien Danjou
ea57fd8fc9
add support for smart windows placement in floating layout
2008-01-28 18:30:23 +01:00
Julien Danjou
30eba52596
rename draw_get_context() to draw_context_new()
2008-01-27 19:02:08 +01:00
Julien Danjou
c5f57d24d3
split out simple window handling
2008-01-26 17:58:01 +01:00
Julien Danjou
4734a8af3d
fix bar left position
2008-01-24 23:25:12 +01:00
Julien Danjou
30256b3be3
cosmetic
2008-01-24 20:24:16 +01:00
Julien Danjou
35803aff4c
make draw functions more independant
2008-01-24 18:43:24 +01:00
Julien Danjou
240ee786d1
rename nscreens to nscreen
2008-01-24 13:48:49 +01:00
Julien Danjou
6396d08c25
kick out rotate option
2008-01-24 10:37:16 +01:00
Julien Danjou
3b899c4922
use simplewindow function to refresh and rework left/right pixmap handling
...
I love hacking at 280 km/h
2008-01-23 19:52:05 +01:00
Julien Danjou
7ad43fe713
stop being stupid, use only one Drawable
2008-01-23 19:10:53 +01:00
Julien Danjou
9e1994d879
rework statusbar stuff
2008-01-23 17:53:55 +01:00
Julien Danjou
0d1497d3bf
fix bottom statusbar position
2008-01-23 17:18:49 +01:00
Julien Danjou
aeee10ea18
add simplewindow_move() function and use it for statusbar
2008-01-23 16:10:05 +01:00
Julien Danjou
5fa25b23f6
add some code for creating SimpleWindow-s and use it for statusbar
2008-01-23 15:54:30 +01:00
Julien Danjou
668702b777
move list.h and util.[ch] to common/
2008-01-21 18:14:59 +01:00
Julien Danjou
bfc7f3ce5d
clean out some need_arrange uneeded
2008-01-21 16:31:15 +01:00
Julien Danjou
6e4d13c9dc
add a new cache system for arrange()ing
2008-01-21 16:31:15 +01:00
Julien Danjou
4d117da0ec
preinit in config.c
2008-01-21 16:31:14 +01:00
Julien Danjou
5180613fe5
fix bug with statusbar recovering each others (FS#37)
2008-01-21 16:31:14 +01:00
Julien Danjou
d59fc62739
draw rectangle take an Area as arg
2008-01-21 16:31:14 +01:00
Julien Danjou
feac2caa81
statusbar_draw is static
2008-01-21 16:31:13 +01:00
Julien Danjou
0ccfeb14b5
use info from the right screen
2008-01-19 14:56:18 +01:00
Julien Danjou
3fc3fd9623
use previous statusbar to get screen size
2008-01-16 15:26:48 +01:00
Julien Danjou
542df6a3ab
do not try to guess where we should XSync(), XSync after bunch of XEvents
2008-01-11 16:17:15 +01:00
Nikos Ntarmos
956ce4ab8e
add nscreen var to store screen count
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-01-11 13:39:48 +01:00
Julien Danjou
2aacaa9320
stop dropping EnterWindow event
...
and make statusbar_update_position static
2008-01-10 20:53:31 +01:00
Julien Danjou
5c9291ff0b
use a cache system for status bar
2008-01-07 18:12:38 +01:00
Julien Danjou
d16b11bb30
cosmetic
2008-01-06 22:46:59 +01:00
Julien Danjou
af6ff367eb
typedef enum Position
2008-01-04 19:12:07 +01:00
Julien Danjou
a12ea9441f
fix window placement for left positionned statusbar
2008-01-04 13:28:51 +01:00
Julien Danjou
4f65aa8f51
rework headers inclusion
2008-01-01 18:02:36 +01:00
Julien Danjou
b9d6a93c59
draw statusbar after init
2007-12-31 10:04:03 +01:00
Julien Danjou
f7f6951957
allow to have several statusbar
2007-12-30 21:00:34 +01:00
Julien Danjou
64e44421dd
allow to set statusbar width
2007-12-30 18:55:46 +01:00
Julien Danjou
643407b5ea
allow to set the statusbar height
2007-12-30 18:54:17 +01:00
Julien Danjou
a051c2db09
free old statusbar drawable
2007-12-30 18:13:33 +01:00
Julien Danjou
cb0203b0a0
don't display if statusbar off
2007-12-30 14:23:01 +01:00
Julien Danjou
0df27e0f6a
split the display part of statusbar_draw(), move it to new statusbar_display(), and call it for expose events
2007-12-30 13:17:26 +01:00
Julien Danjou
1021f86e24
rework draw stuff
...
- remove display from DrawCtx
- add Drawable in statusbar
2007-12-30 12:26:11 +01:00
Julien Danjou
360d9023a4
allow textbox widgets to have their own font
2007-12-29 16:04:06 +01:00
Aldo Cortesi
5f079ef73e
Clean get_screen_info and get_display_info.
...
Besides making these functions much nicer to use, this fixes a number of
things:
- Clients now don't have to free the returned structures.
- The ScreenInfo allocated by XineramaQueryScreens should be freed with XFree,
not p_delete.
This patch also introduces an abstract Area type that will be very useful.
2007-12-23 09:53:50 +01:00
Aldo Cortesi
51379e065b
Clean interface of statusbar_update_position.
2007-12-23 09:51:44 +01:00
Julien Danjou
b0a8522466
rename a bunch of widget functions
2007-12-22 20:55:17 +01:00
Julien Danjou
c232576631
rename a bunch of draw functions
2007-12-22 20:17:24 +01:00
Julien Danjou
afe32e27f0
renders right widget from last to first
2007-12-22 16:49:21 +01:00
Aldo Cortesi
4d4001b41f
Clean interface of statusbar_init.
2007-12-19 10:43:15 +01:00
Aldo Cortesi
7190e4fa48
Change awesome_config -> AwesomeConf.
...
All other struct definitions in the project follow this naming convention.
2007-12-19 10:43:02 +01:00
Aldo Cortesi
980afac1cf
Make sure all uicb_ functions have doxygen annotations.
...
Also refactor some indentation while I'm there.
2007-12-19 10:42:34 +01:00
Aldo Cortesi
ce556ec743
The preferred line length is 80 characters.
2007-12-18 11:27:26 +01:00
Aldo Cortesi
965cbb7e0b
Continue to simplify interfaces that require arguments in globalconf.
...
Today I focus on screen.c.
2007-12-18 11:26:39 +01:00
Aldo Cortesi
205f2c55ca
Make "Statusbar statusbar" the in VirtScreen "Statusbar *statusbar". This is
...
more consistent with the rest of the interface, and will make our life easier
when we have mulitiple statusbars per screen.
2007-12-18 11:26:18 +01:00
Aldo Cortesi
4723ab3627
This patch is a first draft of independently targetable textboxes, and a
...
protocol to speak to them. Given a textbox widget definition like this:
textbox mail {
default = 0
}
textbox time {}
We can update the boxes individually by going:
echo 0 tell_widget mail 10
echo 0 tell_widget time 12:01
Text boxes will dynamically resize to fit their contents. A textbox can be
cleared by going:
echo 0 tell_widget name
A text-box containing no text will take up 0 space in the bar, i.e. it will not
be visible at all
Textboxes now supersede statusbar_set_text, so this call has been removed.
2007-12-17 18:22:05 +01:00
Aldo Cortesi
b6bfd1a4d0
The arg to uicb_ functions is no longer const.
2007-12-17 18:19:44 +01:00
Aldo Cortesi
5715b70ab3
Make empty status bar look nice.
...
It's now possible to have unfilled space on the status bar. Fill it with the
background colour on creation.
Normalise line lengths while I'm at it.
2007-12-16 12:58:21 +01:00
Aldo Cortesi
8880a3804e
Simplify widget draw interface.
2007-12-16 12:54:42 +01:00
Aldo Cortesi
2f74c079aa
Massive, massive interface refactoring.
...
The big change here is that we now keep our configuration structure in a global
variable called globalconf. This radically simplifies many interfaces, since
passing awesomeconf everywhere is no longer necessary. There are also more
subtle interface effects - now we can reliably identify a screen from just a
screen ID, rather than an awesomeconf, screenid tuple.
Overall, this patch makes most of the interfaces in awesome much nicer to use -
enjoy!
Yes, this is a huge patch, but since a lot of the refactoring was done
systematically using vim macros, splitting this up would have been very hard.
2007-12-16 12:12:48 +01:00
Julien Danjou
602f921559
first try to get widget configurable
2007-12-15 18:21:02 +01:00
Julien Danjou
79749fcc7f
remove useless #include
2007-12-15 16:17:57 +01:00
Aldo Cortesi
76ddf235ac
Widget-ise the statusbar.
...
We now have the beginnings of a flexible widget structure for the statusbar.
For now, there is no behavioural change, and the interface is a bit crude, but
watch this space!
2007-12-15 10:15:42 +01:00
Aldo Cortesi
c81b5cfc55
Refactor statusbar.c
...
This a preparatory patch. Refactor statusbar.c to compartmentalise the drawing
of the statusbar "widgets". We can now begin to see what a generalised widget
drawing interface would look like.
Note that at the moment we don't gracefully handle situations where "widgets"
run out of space. That will come as we generalise from here.
2007-12-15 09:48:13 +01:00
Aldo Cortesi
f36a56cdcc
Refactor draw.c
...
This is a big patch that does not change any behaviour. We abstract the data
needed by the draw.c functions into a context object, and pass that around
instead of passing each argument every time. This results in a much cleaner API
- most functions lose 3-4 arguments.
This is a preparatory patch for further work on statusbar.
2007-12-15 09:30:29 +01:00
Julien Danjou
df2a8e1b1d
add a focus history
2007-12-14 21:51:54 +01:00
Julien Danjou
aacb020564
rename statusbar functions
2007-12-14 20:10:52 +01:00
Julien Danjou
bb1381abc2
make tags a linked list instead of array
2007-12-14 19:05:30 +01:00
Julien Danjou
b03cdbd877
remove nlayouts
2007-12-14 17:57:05 +01:00
Julien Danjou
84bb954004
rename statusbar uicb and add uicb_statusbar_set_position
2007-12-14 15:52:52 +01:00
Julien Danjou
078d224b46
use a linked list for handling tag <-> client relationship
2007-12-14 14:29:32 +01:00
Aldo Cortesi
2b5ba1f16f
Improve the call signature of get_current_tag and get_current_layout.
2007-12-14 09:29:42 +01:00
Julien Danjou
5fa67c23df
split awesomeconf and screen config
...
a.k.a the big post-2.0 blind commit
2007-12-11 20:56:51 +01:00
Nathan Hüsken
9524f15478
Adding padding
2007-11-28 11:00:48 +01:00
Julien Danjou
ae49735001
use real and smaller surface size to draw statusbar when rotating
2007-11-13 21:23:13 +01:00
Julien Danjou
19e7737ef0
don't draw statusbar if it's off
2007-11-11 23:23:38 +01:00
Julien Danjou
58391a84fa
don't move status bar offscreen (fails on Xinerama): unmap it instead
2007-11-11 22:47:56 +01:00
Julien Danjou
651dcc5c9e
compute correctly status bar position for left
2007-11-11 22:44:21 +01:00
Julien Danjou
0753ed5fb5
statusbar drawable is no more stored but dynamicaly created; this fix a problem with statusbar on right
2007-11-11 22:27:00 +01:00
Julien Danjou
db65104aa2
use M_PI_2
2007-11-11 21:20:02 +01:00
Julien Danjou
84017b9666
inverse rotate and translate and fix bar position on right for Xinerama
2007-11-11 21:13:37 +01:00
Julien Danjou
543899da7c
fix statusbar display when on right
2007-11-11 19:49:50 +01:00
Julien Danjou
05dad60786
experimental support for status bar to be on right or left
2007-11-11 18:59:11 +01:00
Julien Danjou
602d92d8b2
move statusbar_default_position in Statusbar struct
2007-11-10 10:17:54 +01:00
Julien Danjou
001f430c0c
remove global client_sel, use tag's client_sel
2007-10-26 23:19:13 +02:00
Julien Danjou
bd08d8a119
bugfix: don't display window name in statusbar if sel is not on our screen
2007-10-25 13:48:22 +02:00
Julien Danjou
8ad32d29c2
fix information headers
2007-10-17 10:53:32 +02:00
Julien Danjou
842eed01c0
remove current_layout, insert get_current_layout() to get it dynamicly
2007-10-16 22:33:15 +02:00
Nikos Ntarmos
7ecbae334f
use Cairo to render fonts
2007-10-16 16:35:28 +02:00
Julien Danjou
ccb7e89750
arrange() does not need Display as arg
2007-10-15 18:23:05 +02:00
Julien Danjou
17bc4dc9a7
drawstatusbar does not need display as arg
2007-10-15 18:19:33 +02:00
Julien Danjou
a74ca1d1de
tabswidth is 4 not 6
2007-10-15 13:56:24 +02:00
Julien Danjou
4e0acfa99a
add coding style stuff
2007-10-15 13:40:52 +02:00
Julien Danjou
77609263dc
move txtlenwidth initlization in initstatusbar()
2007-10-15 12:06:43 +02:00
Julien Danjou
a6781157b6
allow to execute uicb function via awesome control fifo
2007-10-12 17:10:36 +02:00
Julien Danjou
863714f501
use p_delete instead of XFree for our own pointers
2007-10-11 23:44:35 +02:00
Julien Danjou
c4e130d7d9
remove Display as param for uicb
2007-10-11 23:32:29 +02:00
Julien Danjou
c3986a5937
sel is no more extern
2007-10-11 23:12:05 +02:00
Julien Danjou
12ef66b79a
clients list is no more global
2007-10-11 21:50:32 +02:00
Julien Danjou
f840f532e3
Fix e22b1e2a73
, size was set too late, and fix memory leak with *si
2007-10-11 19:29:34 +02:00
Julien Danjou
e22b1e2a73
set statusbar->height in initstatusbar()
2007-10-11 18:43:42 +02:00
Julien Danjou
a06674fbe7
add drawcircle() function and use it for floating/max windows instead of drawrectangle
2007-10-11 17:06:55 +02:00
Julien Danjou
1f5a6e918b
use drawrectangle to draw background in statusbar, fix coords of rectangles and compute colors correctly
2007-10-11 16:29:20 +02:00
Julien Danjou
f6ea98649c
drawsquare is now drawrectangle
2007-10-11 15:44:30 +02:00
Julien Danjou
c05ed01c1a
bugfix: only catch first click to raise if we're floating
2007-10-11 11:33:40 +02:00
Julien Danjou
445479cf8b
use Cairo for rendering square instead of Xlib
2007-10-10 19:59:14 +02:00
Julien Danjou
e733af41ec
remove drawcontext everywhere
2007-10-10 14:09:36 +02:00
Julien Danjou
f57d275df1
move font to awesomeconf
2007-10-10 13:34:25 +02:00
Julien Danjou
2d0526696c
move cursors in awesome config
2007-10-10 13:29:46 +02:00
Julien Danjou
1a755ff245
simplify color handling
2007-10-10 13:07:12 +02:00
Julien Danjou
0f75c91fe7
remove x and y attributes from DC
2007-10-09 22:35:44 +02:00
Julien Danjou
355d3aad5f
remove drawcontext `w' attribute
2007-10-09 22:33:00 +02:00
Julien Danjou
c4b1867a4d
remove h attribute of drawcontext
2007-10-09 22:29:44 +02:00
Julien Danjou
2887bb8b86
avoid DC in drawsquare()
2007-10-09 21:43:26 +02:00
Julien Danjou
aa645b15ab
avoid DC in drawtext()
2007-10-09 21:29:19 +02:00
Julien Danjou
de45017b5d
switch to libconfuse instead of libconfig
2007-10-08 18:45:05 +02:00
Julien Danjou
158b91adaf
bugfix: reset correctly default bar position on toggle
...
Thanks Daniel Brinkers
2007-10-08 13:07:13 +02:00
Julien Danjou
d7aac7b811
better fix for font height problem
...
Thanks to Arnaud Fontaine
2007-10-04 17:35:47 +02:00
Julien Danjou
2e0b2911e3
bugfix: give one more pixel to not cut status text with some fonts
2007-10-04 15:56:20 +02:00
Julien Danjou
1c5cd1ec57
bugfix: add a pixel more for tags drawing, this allows all fonts size to work
2007-10-04 12:55:19 +02:00
Julien Danjou
97a2085705
cosmetic: remove lines with empty spaces at end
2007-10-03 17:26:14 +02:00
Julien Danjou
cd46ec6378
remove stack from externs
2007-10-03 00:15:50 +02:00
Julien Danjou
950605b1a0
simplify get_screen_info()
2007-10-01 20:58:29 +02:00
Julien Danjou
272f4b1c2a
Xft support
2007-10-01 19:22:57 +02:00
Julien Danjou
8c531e2a81
store phys_screen
2007-10-01 15:23:05 +02:00
Julien Danjou
659adaab5e
use get_real_screen() in a lot of places
2007-09-28 11:55:08 +02:00
Julien Danjou
11cbd79c62
make a lot of function in event and statusbar creation/handling Xinerama aware
2007-09-27 21:26:25 +02:00
Julien Danjou
14da15bbc9
make Statusbar optional in get_display_info()
2007-09-27 20:16:20 +02:00
Julien Danjou
ecf79693a2
use real_screen for X functions, not logical screen
2007-09-27 17:13:31 +02:00
Julien Danjou
5d06303f48
add mwfact to statusbar printing
2007-09-24 20:23:05 +02:00
Julien Danjou
89fa270bca
display layout nmaster/ncols vars in new tags without clients
2007-09-24 17:08:47 +02:00
Julien Danjou
894b341feb
simplfiy drawstatus() remove screen useless arg
2007-09-24 16:23:49 +02:00
Julien Danjou
595eba78d7
create a Tag struct type and use it
2007-09-24 15:37:52 +02:00
Julien Danjou
9737185639
simplify drawsquare()
2007-09-20 20:11:33 +02:00
Julien Danjou
ce367ebfba
simplify drawsquare()
2007-09-19 15:42:40 +02:00
Julien Danjou
dcec6aa749
remove screen arg from uicb*
2007-09-18 19:53:52 +02:00
Julien Danjou
30e7cf5b40
simplify arrange and restack
2007-09-18 19:53:46 +02:00
Julien Danjou
82e1c44f85
better proto for drawsquare
...
the old one was not logical
2007-09-17 12:45:41 +02:00
Julien Danjou
14107bb49f
bug fix: correctly check if tag is occupied by checking screen number
2007-09-16 16:58:44 +02:00
Julien Danjou
933b0413ea
add screen arg to uicb*
2007-09-16 01:05:43 +02:00
Julien Danjou
e91de5bfb9
restack and arrange take screen as arg
2007-09-15 23:17:59 +02:00
Julien Danjou
e4e8a2966f
get_display_info take screen and screen is stored in statusbar struct
2007-09-15 23:04:04 +02:00
Julien Danjou
53e5630c6c
add screen to drawstatusbar
2007-09-15 22:57:37 +02:00
Julien Danjou
48f17aa9f1
add initstatusbar() to init statusbar!
2007-09-15 22:25:49 +02:00
Julien Danjou
3e3f213b72
move uicb_togglebar to statusbar.c
2007-09-15 15:34:28 +02:00