1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-26 23:13:31 +01:00

4 Commits

Author SHA1 Message Date
David Maciejak
0526ddfc54 WINGs: Make the Extras examples to compile
There is a table view example which is not compiling cause
of a missing lib, also fixed some warnings.
2023-03-12 09:44:10 +00:00
David Maciejak
4c52232ee7 Window titlebar double click to unmaximize
Commit 6e2075f3df from 2020 added
a feature to maximize window when double clicking on the titlebar.
But unmaximizing is not supported so when double clicking again
on the window titlebar the window geometry was not reverted back.
2023-03-12 09:44:10 +00:00
David Maciejak
43edd37ee2 Update file headers year copyright
Update copyright year for Window Maker Team entries.
2023-03-12 09:44:10 +00:00
David Maciejak
e95aea2e30 Workspace pager: display ? on non visited mini workspace
When the workspace pager is displayed it's showing grey mini workspaces
for non rendered/non visited workspaces. That patch is adding an exclamation
mark in the middle of the dummy grey background mini workspaces.
2023-03-11 11:38:25 +00:00
33 changed files with 87 additions and 49 deletions

View File

@@ -10,7 +10,7 @@ include_HEADERS = wtableview.h wtabledelegates.h
lib_LTLIBRARIES = libExtraWINGs.la
noinst_PROGRAMS = test
noinst_PROGRAMS = tableview
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 \
$(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)

View File

@@ -19,13 +19,18 @@ static char *options[] = {
int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
{
(void) self;
(void) table;
return 20;
}
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
{
(void) self;
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
int i;
if (col1[0] == 0) {
for (i = 0; i < 20; i++) {
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) self;
if ((uintptr_t)WMGetTableColumnId(column) == 1)
col1[row] = data;
else
@@ -59,6 +66,7 @@ static WMTableViewDelegate delegate = {
void clickedTable(WMWidget * w, void *self)
{
(void) w;
int row = WMGetTableViewClickedRow((WMTableView *) self);
WMEditTableViewRow(self, row);

View File

@@ -2,6 +2,8 @@
#include <WINGs/WINGsP.h>
#include <X11/cursorfont.h>
#include <stdint.h>
#include <math.h>
#include <float.h>
#include "wtableview.h"
@@ -274,7 +276,7 @@ static void adjustScrollers(WMTableView * table)
prop = 1.0;
} else {
oprop = WMGetScrollerKnobProportion(table->hscroll);
if (oprop == 0.0)
if (fabs(oprop) <= DBL_EPSILON)
oprop = 1.0;
ovalue = WMGetScrollerValue(table->hscroll);
@@ -290,7 +292,7 @@ static void adjustScrollers(WMTableView * table)
prop = 1.0;
} else {
oprop = WMGetScrollerKnobProportion(table->vscroll);
if (oprop == 0.0)
if (fabs(oprop) <= DBL_EPSILON)
oprop = 1.0;
ovalue = WMGetScrollerValue(table->vscroll);
@@ -332,7 +334,7 @@ static void doScroll(WMWidget * self, void *data)
case WSIncrementWheel:
case WSIncrementLine:
value += (float)table->rowHeight / size;
if (value > 1.0)
if (value > (float)1.0)
value = 1.0;
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
repaintTable(table);
@@ -344,7 +346,7 @@ static void doScroll(WMWidget * self, void *data)
case WSDecrementPage:
value -= vpsize / size;
if (value < 0.0)
if (value < (float)0.0)
value = 0.0;
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
repaintTable(table);
@@ -352,7 +354,7 @@ static void doScroll(WMWidget * self, void *data)
case WSIncrementPage:
value += vpsize / size;
if (value > 1.0)
if (value > (float)1.0)
value = 1.0;
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
repaintTable(table);
@@ -398,6 +400,7 @@ static void doScroll(WMWidget * self, void *data)
static void splitterHandler(XEvent * event, void *data)
{
(void) event;
WMTableColumn *column = (WMTableColumn *) data;
WMTableView *table = column->table;
int done = 0;
@@ -451,6 +454,8 @@ static void splitterHandler(XEvent * event, void *data)
static void realizeTable(void *data, WMNotification * notif)
{
(void) notif;
repaintTable(data);
}
@@ -790,7 +795,6 @@ void WMSetTableViewRowHeight(WMTableView * table, int height)
void WMScrollTableViewRowToVisible(WMTableView * table, int row)
{
WMScroller *scroller;
WMRange range;
WMRect rect;
int newY, tmp;
@@ -798,7 +802,6 @@ void WMScrollTableViewRowToVisible(WMTableView * table, int row)
rect = getVisibleRect(table);
range = rowsInRect(table, rect);
scroller = table->vscroll;
if (row < range.position) {
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)
{
(void) self;
reorganizeInterior(view->self);
}
@@ -1167,7 +1172,8 @@ static void reorganizeInterior(WMTableView * table)
WMSize size = getTotalSize(table);
WMView *view = table->view;
int vw, vh;
int hsThickness, vsThickness;
int hsThickness = 0;
int vsThickness = 0;
if (table->vscroll)
vsThickness = WMWidgetWidth(table->vscroll);

View File

@@ -1,5 +1,5 @@
# 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.
# Original by Alwin <translations@ziggo.nl>, 2015.
#

View File

@@ -1,5 +1,5 @@
# 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.
# Original by Alwin <translations@ziggo.nl>, 2014.
#

View File

@@ -2,7 +2,7 @@
*
* 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
*
* This program is free software; you can redistribute it and/or modify

View File

@@ -2,7 +2,7 @@ dnl ============================================================================
dnl
dnl Window Maker autoconf input
dnl
AC_COPYRIGHT([Copyright (c) 2001-2015 The Window Maker Team])
AC_COPYRIGHT([Copyright (c) 2001-2023 The Window Maker Team])
dnl
dnl ============================================================================
dnl

View File

@@ -1,7 +1,7 @@
# wm_i18n.m4 - Macros to check and enable translations in WindowMaker
#
# 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
# it under the terms of the GNU General Public License as published by

View File

@@ -1,6 +1,6 @@
# 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
# it under the terms of the GNU General Public License as published by

View File

@@ -1,5 +1,5 @@
# 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.
# Original by Alwin <translations@ziggo.nl>, 2015.
#

View File

@@ -1,5 +1,5 @@
# 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.
# Original by Alwin <translations@ziggo.nl>, 2014.
#

View File

@@ -4,7 +4,7 @@
# Window Maker window manager
#
# 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
# it under the terms of the GNU General Public License as published by

View File

@@ -4,7 +4,7 @@
# Window Maker window manager
#
# 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
# it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* Window Maker window manager
*
* 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
* it under the terms of the GNU General Public License as published by

View File

@@ -4,7 +4,7 @@
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* 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
* it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* Window Maker window manager
*
* 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
* it under the terms of the GNU General Public License as published by

View File

@@ -4,7 +4,7 @@
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* 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

View File

@@ -4,7 +4,7 @@
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* 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
* it under the terms of the GNU General Public License as published by

View File

@@ -3,7 +3,7 @@
* Window Maker window manager
*
* 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
* it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* Window Maker window manager
*
* 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
* it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
* Window Maker window manager
*
* 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
* it under the terms of the GNU General Public License as published by

View File

@@ -3,7 +3,7 @@
* Window Maker window manager
*
* 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
* it under the terms of the GNU General Public License as published by

View File

@@ -4,7 +4,7 @@
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* 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
* it under the terms of the GNU General Public License as published by

View File

@@ -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;
if (event->xbutton.state == 0) {
/* maximize window full screen*/
dir |= (MAX_VERTICAL|MAX_HORIZONTAL);
int ndir = dir ^ wwin->flags.maximized;
if (ndir != 0)
wMaximizeWindow(wwin, ndir, wGetHeadForWindow(wwin));
}
else
wUnmaximizeWindow(wwin);
}
} else {
int dir = 0;

View File

@@ -2,7 +2,7 @@
*
* 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
* 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;
WMPixmap *icon;
img = RCreateImage(wsmap->wswidth, wsmap->wsheight, 0);
img = RCreateImage(wsmap->mini_workspace_width, wsmap->mini_workspace_height, 0);
if (!img)
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)
{
if (!wsmap->scr->workspaces[index]->map)
return dummy_background_pixmap(wsmap);
return NULL;
if (index == wsmap->scr->current_workspace)
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;
while (w_global.process_workspacemap_event) {
WMMaskEvent(dpy, KeyPressMask | KeyReleaseMask | ExposureMask
| PointerMotionMask | ButtonPressMask | ButtonReleaseMask | EnterWindowMask, &ev);
WMMaskEvent(dpy, KeyPressMask | KeyReleaseMask | ExposureMask | PointerMotionMask |
ButtonPressMask | ButtonReleaseMask | EnterWindowMask | FocusChangeMask, &ev);
modifiers = ev.xkey.state & w_global.shortcut.modifiers_mask;
@@ -530,6 +530,29 @@ static void handle_event(WWorkspaceMap *wsmap, W_WorkspaceMap *wsmap_array)
}
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:
WMHandleEvent(&ev);
break;

View File

@@ -2,7 +2,7 @@
* Window Maker window manager
*
* 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
* it under the terms of the GNU General Public License as published by

View File

@@ -1,7 +1,7 @@
/*
* 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
* it under the terms of the GNU General Public License as published by

View File

@@ -2,7 +2,7 @@
*
* 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
* modify it under the terms of the GNU Library General Public

View File

@@ -3,7 +3,7 @@
* Raster graphics library
*
* 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
* modify it under the terms of the GNU Library General Public

View File

@@ -2,7 +2,7 @@
*
* 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
* modify it under the terms of the GNU Library General Public

View File

@@ -3,7 +3,7 @@
* Raster graphics library
*
* 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
* modify it under the terms of the GNU Library General Public

View File

@@ -2,7 +2,7 @@
*
* 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
* modify it under the terms of the GNU Library General Public

View File

@@ -3,7 +3,7 @@
* Raster graphics library
*
* 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
* modify it under the terms of the GNU Library General Public