]> Dogcows Code - chaz/openbox/blob - openbox/focus_cycle_popup.c
scroll the alttab box in list mode
[chaz/openbox] / openbox / focus_cycle_popup.c
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3 focus_cycle_popup.c for the Openbox window manager
4 Copyright (c) 2006 Mikael Magnusson
5 Copyright (c) 2003-2007 Dana Jansens
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 See the COPYING file for a copy of the GNU General Public License.
18 */
19
20 #include "focus_cycle_popup.h"
21 #include "popup.h"
22 #include "client.h"
23 #include "screen.h"
24 #include "focus.h"
25 #include "openbox.h"
26 #include "window.h"
27 #include "event.h"
28 #include "render/render.h"
29
30 #include <X11/Xlib.h>
31 #include <glib.h>
32
33 /* Size of the hilite box around a window's icon */
34 #define HILITE_SIZE 40
35 /* Width of the outer ring around the hilite box */
36 #define HILITE_WIDTH 2
37 /* Space between the outer ring around the hilite box and the icon inside it */
38 #define HILITE_MARGIN 1
39 /* Total distance from the edge of the hilite box to the icon inside it */
40 #define HILITE_OFFSET (HILITE_WIDTH + HILITE_MARGIN)
41 /* Size of the icons, which can appear inside or outside of a hilite box */
42 #define ICON_SIZE (HILITE_SIZE - 2*HILITE_OFFSET)
43 /* Margin area around the outside of the dialog */
44 #define OUTSIDE_BORDER 3
45 /* Margin area around the text */
46 #define TEXT_BORDER 2
47 /* Scroll the list-mode list when the cursor gets within this many rows of the
48 top or bottom */
49 #define SCROLL_MARGIN 4
50
51 typedef struct _ObFocusCyclePopup ObFocusCyclePopup;
52 typedef struct _ObFocusCyclePopupTarget ObFocusCyclePopupTarget;
53
54 struct _ObFocusCyclePopupTarget
55 {
56 ObClient *client;
57 gchar *text;
58 Window iconwin;
59 /* This is used when the popup is in list mode */
60 Window textwin;
61 };
62
63 struct _ObFocusCyclePopup
64 {
65 ObWindow obwin;
66 Window bg;
67
68 /* This is used when the popup is in icon mode */
69 Window icon_mode_text;
70
71 GList *targets;
72 gint n_targets;
73
74 const ObFocusCyclePopupTarget *last_target;
75
76 gint maxtextw;
77
78 /* How are the list is scrolled, in scroll mode */
79 gint scroll;
80
81 RrAppearance *a_bg;
82 RrAppearance *a_text;
83 RrAppearance *a_hilite_text;
84 RrAppearance *a_icon;
85
86 gboolean mapped;
87 ObFocusCyclePopupMode mode;
88 };
89
90 /*! This popup shows all possible windows */
91 static ObFocusCyclePopup popup;
92 /*! This popup shows a single window */
93 static ObIconPopup *single_popup;
94
95 static gchar *popup_get_name (ObClient *c);
96 static void popup_setup (ObFocusCyclePopup *p,
97 gboolean create_targets,
98 gboolean iconic_windows,
99 gboolean all_desktops,
100 gboolean dock_windows,
101 gboolean desktop_windows);
102 static void popup_render (ObFocusCyclePopup *p,
103 const ObClient *c);
104
105 static Window create_window(Window parent, guint bwidth, gulong mask,
106 XSetWindowAttributes *attr)
107 {
108 return XCreateWindow(obt_display, parent, 0, 0, 1, 1, bwidth,
109 RrDepth(ob_rr_inst), InputOutput,
110 RrVisual(ob_rr_inst), mask, attr);
111 }
112
113 void focus_cycle_popup_startup(gboolean reconfig)
114 {
115 XSetWindowAttributes attrib;
116 RrPixel32 *p;
117
118 single_popup = icon_popup_new();
119
120 popup.obwin.type = OB_WINDOW_CLASS_INTERNAL;
121 popup.a_bg = RrAppearanceCopy(ob_rr_theme->osd_hilite_bg);
122 popup.a_hilite_text = RrAppearanceCopy(ob_rr_theme->osd_hilite_label);
123 popup.a_text = RrAppearanceCopy(ob_rr_theme->a_unfocused_label);
124 popup.a_icon = RrAppearanceCopy(ob_rr_theme->a_clear);
125
126 popup.a_hilite_text->surface.parent = popup.a_bg;
127 popup.a_text->surface.parent = popup.a_bg;
128 popup.a_icon->surface.parent = popup.a_bg;
129
130 popup.a_text->texture[0].data.text.justify = RR_JUSTIFY_LEFT;
131 popup.a_hilite_text->texture[0].data.text.justify = RR_JUSTIFY_LEFT;
132
133 /* 2 textures. texture[0] is the icon. texture[1] is the hilight, and
134 may or may not be used */
135 RrAppearanceAddTextures(popup.a_icon, 2);
136
137 popup.a_icon->texture[0].type = RR_TEXTURE_RGBA;
138
139 attrib.override_redirect = True;
140 attrib.border_pixel=RrColorPixel(ob_rr_theme->osd_border_color);
141 popup.bg = create_window(obt_root(ob_screen), ob_rr_theme->obwidth,
142 CWOverrideRedirect | CWBorderPixel, &attrib);
143
144 /* create the text window used for the icon-mode popup */
145 popup.icon_mode_text = create_window(popup.bg, 0, 0, NULL);
146
147 popup.targets = NULL;
148 popup.n_targets = 0;
149 popup.last_target = NULL;
150
151 /* set up the hilite texture for the icon */
152 popup.a_icon->texture[1].data.rgba.width = HILITE_SIZE;
153 popup.a_icon->texture[1].data.rgba.height = HILITE_SIZE;
154 popup.a_icon->texture[1].data.rgba.alpha = 0xff;
155 p = g_new(RrPixel32, HILITE_SIZE * HILITE_SIZE);
156 popup.a_icon->texture[1].data.rgba.data = p;
157
158 /* create the hilite under the target icon */
159 {
160 RrPixel32 color;
161 gint x, y, o;
162
163 color = ((ob_rr_theme->osd_color->r & 0xff) << RrDefaultRedOffset) +
164 ((ob_rr_theme->osd_color->g & 0xff) << RrDefaultGreenOffset) +
165 ((ob_rr_theme->osd_color->b & 0xff) << RrDefaultBlueOffset);
166
167 o = 0;
168 for (x = 0; x < HILITE_SIZE; x++)
169 for (y = 0; y < HILITE_SIZE; y++) {
170 guchar a;
171
172 if (x < HILITE_WIDTH ||
173 x >= HILITE_SIZE - HILITE_WIDTH ||
174 y < HILITE_WIDTH ||
175 y >= HILITE_SIZE - HILITE_WIDTH)
176 {
177 /* the border of the target */
178 a = 0x88;
179 }
180 else {
181 /* the background of the target */
182 a = 0x22;
183 }
184
185 p[o++] = color + (a << RrDefaultAlphaOffset);
186 }
187 }
188
189 stacking_add(INTERNAL_AS_WINDOW(&popup));
190 window_add(&popup.bg, INTERNAL_AS_WINDOW(&popup));
191 }
192
193 void focus_cycle_popup_shutdown(gboolean reconfig)
194 {
195 icon_popup_free(single_popup);
196
197 window_remove(popup.bg);
198 stacking_remove(INTERNAL_AS_WINDOW(&popup));
199
200 while(popup.targets) {
201 ObFocusCyclePopupTarget *t = popup.targets->data;
202
203 g_free(t->text);
204 XDestroyWindow(obt_display, t->iconwin);
205 XDestroyWindow(obt_display, t->textwin);
206
207 popup.targets = g_list_delete_link(popup.targets, popup.targets);
208 }
209
210 g_free(popup.a_icon->texture[1].data.rgba.data);
211 popup.a_icon->texture[1].data.rgba.data = NULL;
212
213 XDestroyWindow(obt_display, popup.icon_mode_text);
214 XDestroyWindow(obt_display, popup.bg);
215
216 RrAppearanceFree(popup.a_icon);
217 RrAppearanceFree(popup.a_hilite_text);
218 RrAppearanceFree(popup.a_text);
219 RrAppearanceFree(popup.a_bg);
220 }
221
222 static void popup_setup(ObFocusCyclePopup *p, gboolean create_targets,
223 gboolean iconic_windows, gboolean all_desktops,
224 gboolean dock_windows, gboolean desktop_windows)
225 {
226 gint maxwidth, n;
227 GList *it;
228
229 g_assert(p->targets == NULL);
230 g_assert(p->n_targets == 0);
231
232 /* make its width to be the width of all the possible titles */
233
234 /* build a list of all the valid focus targets and measure their strings,
235 and count them */
236 maxwidth = 0;
237 n = 0;
238 for (it = g_list_last(focus_order); it; it = g_list_previous(it)) {
239 ObClient *ft = it->data;
240
241 if (focus_valid_target(ft, TRUE,
242 iconic_windows,
243 all_desktops,
244 dock_windows,
245 desktop_windows))
246 {
247 gchar *text = popup_get_name(ft);
248
249 /* measure */
250 p->a_text->texture[0].data.text.string = text;
251 maxwidth = MAX(maxwidth, RrMinWidth(p->a_text));
252
253 if (!create_targets)
254 g_free(text);
255 else {
256 ObFocusCyclePopupTarget *t = g_new(ObFocusCyclePopupTarget, 1);
257
258 t->client = ft;
259 t->text = text;
260 t->iconwin = create_window(p->bg, 0, 0, NULL);
261 t->textwin = create_window(p->bg, 0, 0, NULL);
262
263 p->targets = g_list_prepend(p->targets, t);
264 ++n;
265 }
266 }
267 }
268
269 p->n_targets = n;
270 p->maxtextw = maxwidth;
271 }
272
273 static gchar *popup_get_name(ObClient *c)
274 {
275 ObClient *p;
276 gchar *title;
277 const gchar *desk = NULL;
278 gchar *ret;
279
280 /* find our highest direct parent */
281 p = client_search_top_direct_parent(c);
282
283 if (c->desktop != DESKTOP_ALL && c->desktop != screen_desktop)
284 desk = screen_desktop_names[c->desktop];
285
286 title = c->iconic ? c->icon_title : c->title;
287
288 /* use the transient's parent's title/icon if we don't have one */
289 if (p != c && title[0] == '\0')
290 title = p->iconic ? p->icon_title : p->title;
291
292 if (desk)
293 ret = g_strdup_printf("%s [%s]", title, desk);
294 else
295 ret = g_strdup(title);
296
297 return ret;
298 }
299
300 static void popup_render(ObFocusCyclePopup *p, const ObClient *c)
301 {
302 gint ml, mt, mr, mb;
303 gint l, t, r, b;
304 gint x, y, w, h;
305 Rect *screen_area = NULL;
306 gint rgbax, rgbay, rgbaw, rgbah;
307 gint i;
308 GList *it;
309 const ObFocusCyclePopupTarget *newtarget;
310 gint icons_per_row;
311 gint icon_rows;
312 gint textw, texth;
313 gint selected_pos;
314 gint last_scroll;
315
316 /* vars for icon mode */
317 gint icon_mode_textx;
318 gint icon_mode_texty;
319 gint icons_center_x;
320
321 /* vars for list mode */
322 gint list_mode_icon_column_w = HILITE_SIZE + OUTSIDE_BORDER;
323
324 g_assert(p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS ||
325 p->mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST);
326
327 screen_area = screen_physical_area_active();
328
329 /* get the outside margins */
330 RrMargins(p->a_bg, &ml, &mt, &mr, &mb);
331
332 /* get our outside borders */
333 l = ml + OUTSIDE_BORDER;
334 r = mr + OUTSIDE_BORDER;
335 t = mt + OUTSIDE_BORDER;
336 b = mb + OUTSIDE_BORDER;
337
338 /* get the width from the text and keep it within limits */
339 w = l + r + p->maxtextw;
340 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST)
341 /* when in list mode, there are icons down the side */
342 w += list_mode_icon_column_w;
343 w = MIN(w, MAX(screen_area->width/3, POPUP_WIDTH)); /* max width */
344 w = MAX(w, POPUP_WIDTH); /* min width */
345
346 /* get the text height */
347 texth = RrMinHeight(p->a_hilite_text);
348 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST)
349 texth = MAX(MAX(texth, RrMinHeight(p->a_text)), ICON_SIZE);
350 else
351 texth += TEXT_BORDER * 2;
352
353 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS) {
354 /* how many icons will fit in that row? make the width fit that */
355 w -= l + r;
356 icons_per_row = (w + HILITE_SIZE - 1) / HILITE_SIZE;
357 w = icons_per_row * HILITE_SIZE + l + r;
358
359 /* how many rows do we need? */
360 icon_rows = (p->n_targets-1) / icons_per_row + 1;
361
362 }
363 else {
364 /* in list mode, there is one column of icons.. */
365 icons_per_row = 1;
366 /* maximum is 80% of the screen height */
367 icon_rows = MIN(p->n_targets,
368 (4*screen_area->height/5) /* 80% of the screen */
369 /
370 MAX(HILITE_SIZE, texth)); /* height of each row */
371 }
372
373 /* get the text width */
374 textw = w - l - r;
375 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST)
376 /* leave space on the side for the icons */
377 textw -= list_mode_icon_column_w;
378
379 /* find the height of the dialog */
380 h = t + b + (icon_rows * MAX(HILITE_SIZE, texth));
381 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS)
382 /* in icon mode the text sits below the icons, so make some space */
383 h += OUTSIDE_BORDER + texth;
384
385 /* center the icons if there is less than one row */
386 if (icon_rows == 1)
387 icons_center_x = (w - p->n_targets * HILITE_SIZE) / 2;
388 else
389 icons_center_x = 0;
390
391 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS) {
392 /* get the position of the text */
393 icon_mode_textx = l;
394 icon_mode_texty = h - texth - b;
395 }
396
397 /* find the position for the popup (include the outer borders) */
398 x = screen_area->x + (screen_area->width -
399 (w + ob_rr_theme->obwidth * 2)) / 2;
400 y = screen_area->y + (screen_area->height -
401 (h + ob_rr_theme->obwidth * 2)) / 2;
402
403 /* get the dimensions of the target hilite texture */
404 rgbax = ml;
405 rgbay = mt;
406 rgbaw = w - ml - mr;
407 rgbah = h - mt - mb;
408
409 if (!p->mapped) {
410 /* position the background but don't draw it */
411 XMoveResizeWindow(obt_display, p->bg, x, y, w, h);
412
413 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS) {
414 /* position the text */
415 XMoveResizeWindow(obt_display, p->icon_mode_text,
416 icon_mode_textx, icon_mode_texty, textw, texth);
417 XMapWindow(obt_display, popup.icon_mode_text);
418 }
419 else
420 XUnmapWindow(obt_display, popup.icon_mode_text);
421
422 /* reset the scrolling when the dialog is first shown */
423 p->scroll = 0;
424 }
425
426 /* find the focused target */
427 newtarget = NULL;
428 for (i = 0, it = p->targets; it; ++i, it = g_list_next(it)) {
429 const ObFocusCyclePopupTarget *target = it->data;
430 if (target->client == c) {
431 /* save the target */
432 newtarget = target;
433 break;
434 }
435 }
436 selected_pos = i;
437
438 /* scroll the list if needed */
439 last_scroll = p->scroll;
440 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST) {
441 const gint top = p->scroll + SCROLL_MARGIN;
442 const gint bottom = p->scroll + icon_rows - SCROLL_MARGIN;
443 const gint min_scroll = 0;
444 const gint max_scroll = p->n_targets - icon_rows;
445
446 if (top - selected_pos >= 0) {
447 p->scroll -= top - selected_pos + 1;
448 p->scroll = MAX(p->scroll, min_scroll);
449 }
450 else if (selected_pos - bottom >= 0) {
451 p->scroll += selected_pos - bottom + 1;
452 p->scroll = MIN(p->scroll, max_scroll);
453 }
454 }
455
456 g_assert(newtarget != NULL);
457
458 /* * * draw everything * * */
459
460 /* draw the background */
461 if (!p->mapped)
462 RrPaint(p->a_bg, p->bg, w, h);
463
464 /* draw the icons and text */
465 for (i = 0, it = p->targets; it; ++i, it = g_list_next(it)) {
466 const ObFocusCyclePopupTarget *target = it->data;
467
468 /* have to redraw the targetted icon and last targetted icon
469 * to update the hilite */
470 if (!p->mapped || newtarget == target || p->last_target == target ||
471 last_scroll != p->scroll)
472 {
473 /* row and column start from 0 */
474 const gint row = i / icons_per_row - p->scroll;
475 const gint col = i % icons_per_row;
476 const ObClientIcon *icon;
477 gint iconx, icony;
478 gint list_mode_textx, list_mode_texty;
479 RrAppearance *text;
480
481 /* find the coordinates for the icon */
482 iconx = icons_center_x + l + (col * HILITE_SIZE);
483 icony = t + (row * MAX(texth, HILITE_SIZE))
484 + MAX(texth - HILITE_SIZE, 0) / 2;
485
486 /* find the dimensions of the text box */
487 list_mode_textx = iconx + HILITE_SIZE + TEXT_BORDER;
488 list_mode_texty = icony + HILITE_OFFSET;
489
490 /* position the icon */
491 XMoveResizeWindow(obt_display, target->iconwin,
492 iconx, icony, HILITE_SIZE, HILITE_SIZE);
493
494 /* position the text */
495 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST)
496 XMoveResizeWindow(obt_display, target->textwin,
497 list_mode_textx, list_mode_texty,
498 textw, texth);
499
500 /* show/hide the right windows */
501 if (row >= 0 && row < icon_rows) {
502 XMapWindow(obt_display, target->iconwin);
503 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST)
504 XMapWindow(obt_display, target->textwin);
505 else
506 XUnmapWindow(obt_display, target->textwin);
507 }
508 else {
509 XUnmapWindow(obt_display, target->textwin);
510 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST)
511 XUnmapWindow(obt_display, target->iconwin);
512 else
513 XMapWindow(obt_display, target->iconwin);
514 }
515
516 /* only draw if we have to */
517 if (!p->mapped ||
518 newtarget == target || p->last_target == target ||
519 /* wasn't visible before... */
520 ((row + p->scroll < last_scroll ||
521 row + p->scroll >= last_scroll + icon_rows) &&
522 /* ...and is visible now */
523 (row >= 0 && row < icon_rows)))
524 {
525 /* get the icon from the client */
526 icon = client_icon(target->client, ICON_SIZE, ICON_SIZE);
527 p->a_icon->texture[0].data.rgba.width = icon->width;
528 p->a_icon->texture[0].data.rgba.height = icon->height;
529 p->a_icon->texture[0].data.rgba.twidth = ICON_SIZE;
530 p->a_icon->texture[0].data.rgba.theight = ICON_SIZE;
531 p->a_icon->texture[0].data.rgba.tx = HILITE_OFFSET;
532 p->a_icon->texture[0].data.rgba.ty = HILITE_OFFSET;
533 p->a_icon->texture[0].data.rgba.alpha =
534 target->client->iconic ? OB_ICONIC_ALPHA : 0xff;
535 p->a_icon->texture[0].data.rgba.data = icon->data;
536
537 /* Draw the hilite? */
538 p->a_icon->texture[1].type = (target == newtarget) ?
539 RR_TEXTURE_RGBA : RR_TEXTURE_NONE;
540
541 /* draw the icon */
542 p->a_icon->surface.parentx = iconx;
543 p->a_icon->surface.parenty = icony;
544 RrPaint(p->a_icon, target->iconwin, HILITE_SIZE, HILITE_SIZE);
545
546 /* draw the text */
547 if (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_LIST ||
548 target == newtarget)
549 {
550 text = (target == newtarget) ? p->a_hilite_text : p->a_text;
551 text->texture[0].data.text.string = target->text;
552 text->surface.parentx =
553 p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS ?
554 icon_mode_textx : list_mode_textx;
555 text->surface.parenty =
556 p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS ?
557 icon_mode_texty : list_mode_texty;
558 RrPaint(text,
559 (p->mode == OB_FOCUS_CYCLE_POPUP_MODE_ICONS ?
560 p->icon_mode_text : target->textwin),
561 textw, texth);
562 }
563 }
564 }
565 }
566
567 p->last_target = newtarget;
568
569 g_free(screen_area);
570
571 XFlush(obt_display);
572 }
573
574 void focus_cycle_popup_show(ObClient *c, gboolean iconic_windows,
575 gboolean all_desktops, gboolean dock_windows,
576 gboolean desktop_windows,
577 ObFocusCyclePopupMode mode)
578 {
579 g_assert(c != NULL);
580
581 if (mode == OB_FOCUS_CYCLE_POPUP_MODE_NONE) {
582 focus_cycle_popup_hide();
583 return;
584 }
585
586 /* do this stuff only when the dialog is first showing */
587 if (!popup.mapped) {
588 popup_setup(&popup, TRUE, iconic_windows, all_desktops,
589 dock_windows, desktop_windows);
590 /* this is fixed once the dialog is shown */
591 popup.mode = mode;
592 }
593 g_assert(popup.targets != NULL);
594
595 popup_render(&popup, c);
596
597 if (!popup.mapped) {
598 /* show the dialog */
599 XMapWindow(obt_display, popup.bg);
600 XFlush(obt_display);
601 popup.mapped = TRUE;
602 screen_hide_desktop_popup();
603 }
604 }
605
606 void focus_cycle_popup_hide(void)
607 {
608 gulong ignore_start;
609
610 ignore_start = event_start_ignore_all_enters();
611
612 XUnmapWindow(obt_display, popup.bg);
613 XFlush(obt_display);
614
615 event_end_ignore_all_enters(ignore_start);
616
617 popup.mapped = FALSE;
618
619 while(popup.targets) {
620 ObFocusCyclePopupTarget *t = popup.targets->data;
621
622 g_free(t->text);
623 XDestroyWindow(obt_display, t->iconwin);
624 XDestroyWindow(obt_display, t->textwin);
625 g_free(t);
626
627 popup.targets = g_list_delete_link(popup.targets, popup.targets);
628 }
629 popup.n_targets = 0;
630 popup.last_target = NULL;
631 }
632
633 void focus_cycle_popup_single_show(struct _ObClient *c,
634 gboolean iconic_windows,
635 gboolean all_desktops,
636 gboolean dock_windows,
637 gboolean desktop_windows)
638 {
639 gchar *text;
640
641 g_assert(c != NULL);
642
643 /* do this stuff only when the dialog is first showing */
644 if (!popup.mapped) {
645 Rect *a;
646
647 popup_setup(&popup, FALSE, iconic_windows, all_desktops,
648 dock_windows, desktop_windows);
649 g_assert(popup.targets == NULL);
650
651 /* position the popup */
652 a = screen_physical_area_active();
653 icon_popup_position(single_popup, CenterGravity,
654 a->x + a->width / 2, a->y + a->height / 2);
655 icon_popup_height(single_popup, POPUP_HEIGHT);
656 icon_popup_min_width(single_popup, POPUP_WIDTH);
657 icon_popup_max_width(single_popup, MAX(a->width/3, POPUP_WIDTH));
658 icon_popup_text_width(single_popup, popup.maxtextw);
659 g_free(a);
660 }
661
662 text = popup_get_name(c);
663 icon_popup_show(single_popup, text, client_icon(c, HILITE_SIZE,
664 HILITE_SIZE));
665 g_free(text);
666 screen_hide_desktop_popup();
667 }
668
669 void focus_cycle_popup_single_hide(void)
670 {
671 icon_popup_hide(single_popup);
672 }
This page took 0.070136 seconds and 5 git commands to generate.