mirror of
https://github.com/gryf/wmaker.git
synced 2026-03-27 07:23:31 +01:00
Compare commits
4 Commits
mynext
...
0526ddfc54
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0526ddfc54 | ||
|
|
4c52232ee7 | ||
|
|
43edd37ee2 | ||
|
|
e95aea2e30 |
@@ -10,7 +10,7 @@ include_HEADERS = wtableview.h wtabledelegates.h
|
|||||||
|
|
||||||
lib_LTLIBRARIES = libExtraWINGs.la
|
lib_LTLIBRARIES = libExtraWINGs.la
|
||||||
|
|
||||||
noinst_PROGRAMS = test
|
noinst_PROGRAMS = tableview
|
||||||
|
|
||||||
EXTRA_DIST =
|
EXTRA_DIST =
|
||||||
|
|
||||||
@@ -25,6 +25,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs \
|
|||||||
|
|
||||||
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
||||||
$(top_builddir)/WINGs/libWUtil.la \
|
$(top_builddir)/WINGs/libWUtil.la \
|
||||||
@XFT_LIBS@ @INTLIBS@
|
@XFT_LIBS@ @INTLIBS@ @XLIBS@
|
||||||
|
|
||||||
test_LDADD = wtableview.o wtabledelegates.o $(LDADD)
|
tableview_LDADD = wtableview.o wtabledelegates.o $(LDADD)
|
||||||
|
|||||||
@@ -19,13 +19,18 @@ static char *options[] = {
|
|||||||
|
|
||||||
int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
|
int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
|
||||||
{
|
{
|
||||||
|
(void) self;
|
||||||
|
(void) table;
|
||||||
|
|
||||||
return 20;
|
return 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
||||||
{
|
{
|
||||||
|
(void) self;
|
||||||
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
|
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (col1[0] == 0) {
|
if (col1[0] == 0) {
|
||||||
for (i = 0; i < 20; i++) {
|
for (i = 0; i < 20; i++) {
|
||||||
char buf[128];
|
char buf[128];
|
||||||
@@ -44,6 +49,8 @@ void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
|||||||
|
|
||||||
void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data)
|
void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data)
|
||||||
{
|
{
|
||||||
|
(void) self;
|
||||||
|
|
||||||
if ((uintptr_t)WMGetTableColumnId(column) == 1)
|
if ((uintptr_t)WMGetTableColumnId(column) == 1)
|
||||||
col1[row] = data;
|
col1[row] = data;
|
||||||
else
|
else
|
||||||
@@ -59,6 +66,7 @@ static WMTableViewDelegate delegate = {
|
|||||||
|
|
||||||
void clickedTable(WMWidget * w, void *self)
|
void clickedTable(WMWidget * w, void *self)
|
||||||
{
|
{
|
||||||
|
(void) w;
|
||||||
int row = WMGetTableViewClickedRow((WMTableView *) self);
|
int row = WMGetTableViewClickedRow((WMTableView *) self);
|
||||||
|
|
||||||
WMEditTableViewRow(self, row);
|
WMEditTableViewRow(self, row);
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
#include <WINGs/WINGsP.h>
|
#include <WINGs/WINGsP.h>
|
||||||
#include <X11/cursorfont.h>
|
#include <X11/cursorfont.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <float.h>
|
||||||
|
|
||||||
#include "wtableview.h"
|
#include "wtableview.h"
|
||||||
|
|
||||||
@@ -274,7 +276,7 @@ static void adjustScrollers(WMTableView * table)
|
|||||||
prop = 1.0;
|
prop = 1.0;
|
||||||
} else {
|
} else {
|
||||||
oprop = WMGetScrollerKnobProportion(table->hscroll);
|
oprop = WMGetScrollerKnobProportion(table->hscroll);
|
||||||
if (oprop == 0.0)
|
if (fabs(oprop) <= DBL_EPSILON)
|
||||||
oprop = 1.0;
|
oprop = 1.0;
|
||||||
ovalue = WMGetScrollerValue(table->hscroll);
|
ovalue = WMGetScrollerValue(table->hscroll);
|
||||||
|
|
||||||
@@ -290,7 +292,7 @@ static void adjustScrollers(WMTableView * table)
|
|||||||
prop = 1.0;
|
prop = 1.0;
|
||||||
} else {
|
} else {
|
||||||
oprop = WMGetScrollerKnobProportion(table->vscroll);
|
oprop = WMGetScrollerKnobProportion(table->vscroll);
|
||||||
if (oprop == 0.0)
|
if (fabs(oprop) <= DBL_EPSILON)
|
||||||
oprop = 1.0;
|
oprop = 1.0;
|
||||||
ovalue = WMGetScrollerValue(table->vscroll);
|
ovalue = WMGetScrollerValue(table->vscroll);
|
||||||
|
|
||||||
@@ -332,7 +334,7 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
case WSIncrementWheel:
|
case WSIncrementWheel:
|
||||||
case WSIncrementLine:
|
case WSIncrementLine:
|
||||||
value += (float)table->rowHeight / size;
|
value += (float)table->rowHeight / size;
|
||||||
if (value > 1.0)
|
if (value > (float)1.0)
|
||||||
value = 1.0;
|
value = 1.0;
|
||||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||||
repaintTable(table);
|
repaintTable(table);
|
||||||
@@ -344,7 +346,7 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
|
|
||||||
case WSDecrementPage:
|
case WSDecrementPage:
|
||||||
value -= vpsize / size;
|
value -= vpsize / size;
|
||||||
if (value < 0.0)
|
if (value < (float)0.0)
|
||||||
value = 0.0;
|
value = 0.0;
|
||||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||||
repaintTable(table);
|
repaintTable(table);
|
||||||
@@ -352,7 +354,7 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
|
|
||||||
case WSIncrementPage:
|
case WSIncrementPage:
|
||||||
value += vpsize / size;
|
value += vpsize / size;
|
||||||
if (value > 1.0)
|
if (value > (float)1.0)
|
||||||
value = 1.0;
|
value = 1.0;
|
||||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||||
repaintTable(table);
|
repaintTable(table);
|
||||||
@@ -398,6 +400,7 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
|
|
||||||
static void splitterHandler(XEvent * event, void *data)
|
static void splitterHandler(XEvent * event, void *data)
|
||||||
{
|
{
|
||||||
|
(void) event;
|
||||||
WMTableColumn *column = (WMTableColumn *) data;
|
WMTableColumn *column = (WMTableColumn *) data;
|
||||||
WMTableView *table = column->table;
|
WMTableView *table = column->table;
|
||||||
int done = 0;
|
int done = 0;
|
||||||
@@ -451,6 +454,8 @@ static void splitterHandler(XEvent * event, void *data)
|
|||||||
|
|
||||||
static void realizeTable(void *data, WMNotification * notif)
|
static void realizeTable(void *data, WMNotification * notif)
|
||||||
{
|
{
|
||||||
|
(void) notif;
|
||||||
|
|
||||||
repaintTable(data);
|
repaintTable(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -790,7 +795,6 @@ void WMSetTableViewRowHeight(WMTableView * table, int height)
|
|||||||
|
|
||||||
void WMScrollTableViewRowToVisible(WMTableView * table, int row)
|
void WMScrollTableViewRowToVisible(WMTableView * table, int row)
|
||||||
{
|
{
|
||||||
WMScroller *scroller;
|
|
||||||
WMRange range;
|
WMRange range;
|
||||||
WMRect rect;
|
WMRect rect;
|
||||||
int newY, tmp;
|
int newY, tmp;
|
||||||
@@ -798,7 +802,6 @@ void WMScrollTableViewRowToVisible(WMTableView * table, int row)
|
|||||||
rect = getVisibleRect(table);
|
rect = getVisibleRect(table);
|
||||||
range = rowsInRect(table, rect);
|
range = rowsInRect(table, rect);
|
||||||
|
|
||||||
scroller = table->vscroll;
|
|
||||||
|
|
||||||
if (row < range.position) {
|
if (row < range.position) {
|
||||||
newY = row * table->rowHeight - rect.size.height / 2;
|
newY = row * table->rowHeight - rect.size.height / 2;
|
||||||
@@ -1157,6 +1160,8 @@ static void handleEvents(XEvent * event, void *data)
|
|||||||
|
|
||||||
static void handleResize(W_ViewDelegate * self, WMView * view)
|
static void handleResize(W_ViewDelegate * self, WMView * view)
|
||||||
{
|
{
|
||||||
|
(void) self;
|
||||||
|
|
||||||
reorganizeInterior(view->self);
|
reorganizeInterior(view->self);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1167,7 +1172,8 @@ static void reorganizeInterior(WMTableView * table)
|
|||||||
WMSize size = getTotalSize(table);
|
WMSize size = getTotalSize(table);
|
||||||
WMView *view = table->view;
|
WMView *view = table->view;
|
||||||
int vw, vh;
|
int vw, vh;
|
||||||
int hsThickness, vsThickness;
|
int hsThickness = 0;
|
||||||
|
int vsThickness = 0;
|
||||||
|
|
||||||
if (table->vscroll)
|
if (table->vscroll)
|
||||||
vsThickness = WMWidgetWidth(table->vscroll);
|
vsThickness = WMWidgetWidth(table->vscroll);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Translation into Western Frisian for Window Maker
|
# Translation into Western Frisian for Window Maker
|
||||||
# Copyright (C) 2015-2016 Window Maker Developers Team
|
# Copyright (C) 2015-2019 Window Maker Developers Team
|
||||||
# This file is distributed under the same license as the windowmaker package.
|
# This file is distributed under the same license as the windowmaker package.
|
||||||
# Original by Alwin <translations@ziggo.nl>, 2015.
|
# Original by Alwin <translations@ziggo.nl>, 2015.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# New translation into Dutch for Window Maker
|
# New translation into Dutch for Window Maker
|
||||||
# Copyright (C) 2014-2015 Window Maker Developers Team
|
# Copyright (C) 2014-2019 Window Maker Developers Team
|
||||||
# This file is distributed under the same license as the windowmaker package.
|
# This file is distributed under the same license as the windowmaker package.
|
||||||
# Original by Alwin <translations@ziggo.nl>, 2014.
|
# Original by Alwin <translations@ziggo.nl>, 2014.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* WPrefs - Window Maker Preferences Program
|
* WPrefs - Window Maker Preferences Program
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2023 Window Maker Team
|
||||||
* Copyright (c) 1998-2003 Alfredo K. Kojima
|
* Copyright (c) 1998-2003 Alfredo K. Kojima
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ dnl ============================================================================
|
|||||||
dnl
|
dnl
|
||||||
dnl Window Maker autoconf input
|
dnl Window Maker autoconf input
|
||||||
dnl
|
dnl
|
||||||
AC_COPYRIGHT([Copyright (c) 2001-2015 The Window Maker Team])
|
AC_COPYRIGHT([Copyright (c) 2001-2023 The Window Maker Team])
|
||||||
dnl
|
dnl
|
||||||
dnl ============================================================================
|
dnl ============================================================================
|
||||||
dnl
|
dnl
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# wm_i18n.m4 - Macros to check and enable translations in WindowMaker
|
# wm_i18n.m4 - Macros to check and enable translations in WindowMaker
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2015 Christophe CURIS
|
# Copyright (c) 2014-2015 Christophe CURIS
|
||||||
# Copyright (c) 2015 The Window Maker Tean
|
# Copyright (c) 2015-2021 The Window Maker Tean
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# wm_libexif.m4 - Macros to check proper libexif
|
# wm_libexif.m4 - Macros to check proper libexif
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 Window Maker Team
|
# Copyright (c) 2014-2015 Window Maker Team
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
2
po/fy.po
2
po/fy.po
@@ -1,5 +1,5 @@
|
|||||||
# Translation into Western Frisian for Window Maker
|
# Translation into Western Frisian for Window Maker
|
||||||
# Copyright (C) 2015-2016 Window Maker Developers Team
|
# Copyright (C) 2015-2020 Window Maker Developers Team
|
||||||
# This file is distributed under the same license as the windowmaker package.
|
# This file is distributed under the same license as the windowmaker package.
|
||||||
# Original by Alwin <translations@ziggo.nl>, 2015.
|
# Original by Alwin <translations@ziggo.nl>, 2015.
|
||||||
#
|
#
|
||||||
|
|||||||
2
po/nl.po
2
po/nl.po
@@ -1,5 +1,5 @@
|
|||||||
# New translation into Dutch for Window Maker
|
# New translation into Dutch for Window Maker
|
||||||
# Copyright (C) 2014-2016 Window Maker Developers Team
|
# Copyright (C) 2014-2020 Window Maker Developers Team
|
||||||
# This file is distributed under the same license as the windowmaker package.
|
# This file is distributed under the same license as the windowmaker package.
|
||||||
# Original by Alwin <translations@ziggo.nl>, 2014.
|
# Original by Alwin <translations@ziggo.nl>, 2014.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Window Maker window manager
|
# Window Maker window manager
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 Christophe CURIS
|
# Copyright (c) 2014 Christophe CURIS
|
||||||
# Copyright (c) 2014 Window Maker Team
|
# Copyright (c) 2014-2015 Window Maker Team
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Window Maker window manager
|
# Window Maker window manager
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2015 Christophe CURIS
|
# Copyright (c) 2014-2015 Christophe CURIS
|
||||||
# Copyright (c) 2015 Window Maker Team
|
# Copyright (c) 2015-2019 Window Maker Team
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Window Maker window manager
|
* Window Maker window manager
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2023 Window Maker Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 1998-2003 Dan Pascu
|
* Copyright (c) 1998-2003 Dan Pascu
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2023 Window Maker Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Window Maker window manager
|
* Window Maker window manager
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2003 Alfredo K. Kojima
|
* Copyright (c) 1998-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2016 Window Maker Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 1998-2003 Dan Pascu
|
* Copyright (c) 1998-2003 Dan Pascu
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2023 Window Maker Team
|
||||||
|
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 1998-2003 Dan Pascu
|
* Copyright (c) 1998-2003 Dan Pascu
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2023 Window Maker Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Window Maker window manager
|
* Window Maker window manager
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2023 Window Maker Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Window Maker window manager
|
* Window Maker window manager
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2023 Window Maker Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Window Maker window manager
|
* Window Maker window manager
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 2013 Window Maker Team
|
* Copyright (c) 2013-2023 Window Maker Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Window Maker window manager
|
* Window Maker window manager
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 2013 Window Maker Team
|
* Copyright (c) 2013-2016 Window Maker Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 1998-2003 Dan Pascu
|
* Copyright (c) 1998-2003 Dan Pascu
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2023 Window Maker Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -2913,17 +2913,18 @@ static void titlebarDblClick(WCoreWindow *sender, void *data, XEvent *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wPreferences.double_click_fullscreen){
|
if (wPreferences.double_click_fullscreen) {
|
||||||
int dir = 0;
|
int dir = 0;
|
||||||
|
|
||||||
if (event->xbutton.state == 0) {
|
if (event->xbutton.state == 0) {
|
||||||
/* maximize window full screen*/
|
/* maximize window full screen*/
|
||||||
dir |= (MAX_VERTICAL|MAX_HORIZONTAL);
|
dir |= (MAX_VERTICAL|MAX_HORIZONTAL);
|
||||||
int ndir = dir ^ wwin->flags.maximized;
|
int ndir = dir ^ wwin->flags.maximized;
|
||||||
|
if (ndir != 0)
|
||||||
wMaximizeWindow(wwin, ndir, wGetHeadForWindow(wwin));
|
wMaximizeWindow(wwin, ndir, wGetHeadForWindow(wwin));
|
||||||
|
else
|
||||||
|
wUnmaximizeWindow(wwin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
int dir = 0;
|
int dir = 0;
|
||||||
|
|
||||||
|
|||||||
33
src/wsmap.c
33
src/wsmap.c
@@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Window Maker window manager
|
* Window Maker window manager
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Window Maker Team - David Maciejak
|
* Copyright (c) 2014-2023 Window Maker Team - David Maciejak
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -256,7 +256,7 @@ static WMPixmap *dummy_background_pixmap(WWorkspaceMap *wsmap)
|
|||||||
RImage *img;
|
RImage *img;
|
||||||
WMPixmap *icon;
|
WMPixmap *icon;
|
||||||
|
|
||||||
img = RCreateImage(wsmap->wswidth, wsmap->wsheight, 0);
|
img = RCreateImage(wsmap->mini_workspace_width, wsmap->mini_workspace_height, 0);
|
||||||
|
|
||||||
if (!img)
|
if (!img)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -327,7 +327,7 @@ static void hide_mini_workspace(W_WorkspaceMap *wsmap_array, int i)
|
|||||||
static WMPixmap *get_mini_workspace(WWorkspaceMap *wsmap, int index)
|
static WMPixmap *get_mini_workspace(WWorkspaceMap *wsmap, int index)
|
||||||
{
|
{
|
||||||
if (!wsmap->scr->workspaces[index]->map)
|
if (!wsmap->scr->workspaces[index]->map)
|
||||||
return dummy_background_pixmap(wsmap);
|
return NULL;
|
||||||
|
|
||||||
if (index == wsmap->scr->current_workspace)
|
if (index == wsmap->scr->current_workspace)
|
||||||
return enlight_workspace(wsmap->scr, wsmap->scr->workspaces[index]->map);
|
return enlight_workspace(wsmap->scr, wsmap->scr->workspaces[index]->map);
|
||||||
@@ -486,8 +486,8 @@ static void handle_event(WWorkspaceMap *wsmap, W_WorkspaceMap *wsmap_array)
|
|||||||
|
|
||||||
w_global.process_workspacemap_event = True;
|
w_global.process_workspacemap_event = True;
|
||||||
while (w_global.process_workspacemap_event) {
|
while (w_global.process_workspacemap_event) {
|
||||||
WMMaskEvent(dpy, KeyPressMask | KeyReleaseMask | ExposureMask
|
WMMaskEvent(dpy, KeyPressMask | KeyReleaseMask | ExposureMask | PointerMotionMask |
|
||||||
| PointerMotionMask | ButtonPressMask | ButtonReleaseMask | EnterWindowMask, &ev);
|
ButtonPressMask | ButtonReleaseMask | EnterWindowMask | FocusChangeMask, &ev);
|
||||||
|
|
||||||
modifiers = ev.xkey.state & w_global.shortcut.modifiers_mask;
|
modifiers = ev.xkey.state & w_global.shortcut.modifiers_mask;
|
||||||
|
|
||||||
@@ -530,6 +530,29 @@ static void handle_event(WWorkspaceMap *wsmap, W_WorkspaceMap *wsmap_array)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case FocusIn:
|
||||||
|
WMScreen *wmscr = wsmap->scr->wmscreen;
|
||||||
|
WMColor *black = WMBlackColor(wmscr);
|
||||||
|
const char *text = "?";
|
||||||
|
WMFont *bold = WMBoldSystemFontOfSize(wmscr, wsmap->mini_workspace_width / 3);
|
||||||
|
int x = (wsmap->mini_workspace_width / 2) - (WMWidthOfString(bold, text, strlen(text)) / 2);
|
||||||
|
int y = (wsmap->mini_workspace_height / 2) - (WMFontHeight(bold) / 2);
|
||||||
|
WMPixmap *icon = dummy_background_pixmap(wsmap);
|
||||||
|
|
||||||
|
if (icon) {
|
||||||
|
int i;
|
||||||
|
|
||||||
|
WMDrawString(wmscr, WMGetPixmapXID(icon),
|
||||||
|
black, bold, x, y, text, strlen(text));
|
||||||
|
for (i = 0; i < wsmap->scr->workspace_count; i++) {
|
||||||
|
if (!wsmap->scr->workspaces[i]->map)
|
||||||
|
WMSetButtonImage(wsmap_array[i].workspace_img_button, icon);
|
||||||
|
}
|
||||||
|
WMReleasePixmap(icon);
|
||||||
|
}
|
||||||
|
WMHandleEvent(&ev);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
WMHandleEvent(&ev);
|
WMHandleEvent(&ev);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Window Maker window manager
|
* Window Maker window manager
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2015 Window Maker Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Window Maker window manager
|
* Window Maker window manager
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Window Maker Team - David Maciejak
|
* Copyright (c) 2014-2023 Window Maker Team - David Maciejak
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Raster graphics library
|
* Raster graphics library
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2021 Window Maker Team
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Raster graphics library
|
* Raster graphics library
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2021 Window Maker Team
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Raster graphics library
|
* Raster graphics library
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2021 Window Maker Team
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Raster graphics library
|
* Raster graphics library
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2021 Window Maker Team
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* Raster graphics library
|
* Raster graphics library
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2021 Window Maker Team
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
* Raster graphics library
|
* Raster graphics library
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
* Copyright (c) 1997-2003 Alfredo K. Kojima
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2021 Window Maker Team
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
|||||||
Reference in New Issue
Block a user